🔨 Update docs.py script to enable dirty reload conditionally (#1060)
This commit is contained in:
parent
26a93e1e7d
commit
843ed98f76
@ -104,7 +104,7 @@ def verify_readme() -> None:
|
||||
|
||||
|
||||
@app.command()
|
||||
def live() -> None:
|
||||
def live(dirty: bool = False) -> None:
|
||||
"""
|
||||
Serve with livereload a docs site for a specific language.
|
||||
|
||||
@ -115,11 +115,10 @@ def live() -> None:
|
||||
en.
|
||||
"""
|
||||
# Enable line numbers during local development to make it easier to highlight
|
||||
subprocess.run(
|
||||
["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008", "--dirty"],
|
||||
env={**os.environ, "LINENUMS": "true"},
|
||||
check=True,
|
||||
)
|
||||
args = ["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008"]
|
||||
if dirty:
|
||||
args.append("--dirty")
|
||||
subprocess.run(args, env={**os.environ, "LINENUMS": "true"}, check=True)
|
||||
|
||||
|
||||
@app.command()
|
||||
|
Loading…
x
Reference in New Issue
Block a user