Browse Source

🔨 Update script for live reload

pull/15563/head
Sebastián Ramírez 3 weeks ago
parent
commit
e475ffdf11
  1. 21
      scripts/docs.py

21
scripts/docs.py

@ -473,33 +473,20 @@ def serve() -> None:
@app.command() @app.command()
def live( def live() -> None:
lang: str = typer.Argument(
None, callback=lang_callback, autocompletion=complete_existing_lang
),
) -> None:
""" """
Serve with livereload a docs site for a specific language. Serve the English docs with livereload from the source files.
This only shows the actual translated files, not the placeholders created with
build-all.
Takes an optional LANG argument with the name of the language to serve, by default
en.
""" """
if lang is None:
lang = "en"
config_path = stage_zensical_docs(lang)
subprocess.run( subprocess.run(
[ [
"zensical", "zensical",
"serve", "serve",
"--config-file", "--config-file",
config_path.name, mkdocs_name,
"--dev-addr", "--dev-addr",
"127.0.0.1:8008", "127.0.0.1:8008",
], ],
cwd=config_path.parent, cwd=en_docs_path,
check=True, check=True,
) )

Loading…
Cancel
Save