mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Better documentation for --static, closes #641
https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files
This commit is contained in:
parent
aca41618f8
commit
df2879ee2a
9 changed files with 54 additions and 9 deletions
|
|
@ -159,7 +159,7 @@ def plugins(all, plugins_dir):
|
|||
@click.option(
|
||||
"--static",
|
||||
type=StaticMount(),
|
||||
help="mountpoint:path-to-directory for serving static files",
|
||||
help="Serve static files from this directory at /MOUNT/...",
|
||||
multiple=True,
|
||||
)
|
||||
@click.option(
|
||||
|
|
@ -281,7 +281,7 @@ def package(
|
|||
@click.option(
|
||||
"--static",
|
||||
type=StaticMount(),
|
||||
help="mountpoint:path-to-directory for serving static files",
|
||||
help="Serve static files from this directory at /MOUNT/...",
|
||||
multiple=True,
|
||||
)
|
||||
@click.option("--memory", is_flag=True, help="Make :memory: database available")
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def add_common_publish_arguments_and_options(subcommand):
|
|||
click.option(
|
||||
"--static",
|
||||
type=StaticMount(),
|
||||
help="mountpoint:path-to-directory for serving static files",
|
||||
help="Serve static files from this directory at /MOUNT/...",
|
||||
multiple=True,
|
||||
),
|
||||
click.option(
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ def remove_infinites(row):
|
|||
|
||||
|
||||
class StaticMount(click.ParamType):
|
||||
name = "static mount"
|
||||
name = "mount:directory"
|
||||
|
||||
def convert(self, value, param, ctx):
|
||||
if ":" not in value:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue