From cdf7b939df2878564e27fcfa8b1388891d259215 Mon Sep 17 00:00:00 2001 From: Elliot Gunton Date: Wed, 13 Nov 2024 15:53:34 -0700 Subject: [PATCH] Add a local build-docs make target * Make it easier to check doc changes before making a PR * Also remove deprecated options in mkdocs.yml Signed-off-by: Elliot Gunton --- Makefile | 5 +++++ mkdocs.yml | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index eeb6e9360..9e2e6341c 100644 --- a/Makefile +++ b/Makefile @@ -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 + @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 diff --git a/mkdocs.yml b/mkdocs.yml index 9483a8c3a..7556b8830 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 @@ -135,8 +135,6 @@ plugins: - include-markdown - autorefs - mkdocstrings: - watch: - - src handlers: python: options: