Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔨 Update docs.py script to enable dirty reload conditionally #918

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions scripts/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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.

Expand All @@ -89,11 +89,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()
Expand Down
Loading