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

Add a local build-docs make target #1264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ init-files:
examples: ## Generate documentation files for examples
@(cd docs && poetry run python generate.py)

.PHONY: build-docs
build-docs: ## Generate (and host) documentation locally
@python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth making a separate venv for this so we don't accidentally disrupt the Poetry one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@python -m mkdocs build --clean --site-dir build/docs/html --config-file mkdocs.yml

.PHONY: regenerate-example
regenerate-example: ## Regenerates the yaml for a single example, using EXAMPLE_FILENAME envvar
regenerate-example: install
Expand Down
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ markdown_extensions:
- pymdownx.smartsymbols
- footnotes
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
Expand All @@ -135,8 +135,6 @@ plugins:
- include-markdown
- autorefs
- mkdocstrings:
watch:
- src
handlers:
python:
options:
Expand Down