-
Notifications
You must be signed in to change notification settings - Fork 127
Migrate documentation to use Zensical instead of MkDocs #1557
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
Changes from all commits
7c20c80
16335dc
f069637
f764698
18fb4f0
e088723
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # Read the Docs configuration file for MkDocs projects | ||
| # See https://docs.readthedocs.io/en/stable/intro/mkdocs.html for details | ||
| # Read the Docs configuration file for Zensical projects | ||
tleonhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # See https://docs.readthedocs.com/platform/stable/intro/zensical.html for details | ||
|
|
||
| # Required | ||
| version: 2 | ||
|
|
@@ -10,17 +10,23 @@ version: 2 | |
| # - epub | ||
| formats: all | ||
|
|
||
| # Build documentation in the "docs/" directory with MkDocs | ||
| mkdocs: | ||
| configuration: mkdocs.yml | ||
|
|
||
| # Set the OS, Python version and other tools you might need | ||
| build: | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "3.13" | ||
| python: latest | ||
tleonhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| jobs: | ||
| pre_create_environment: | ||
| - asdf plugin add uv | ||
| - asdf install uv latest | ||
| - asdf global uv latest | ||
| create_environment: | ||
| - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" | ||
| install: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 These |
||
| - pip install . | ||
| - pip install dependency-groups | ||
| - pip-install-dependency-groups docs | ||
| - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --group docs | ||
| build: | ||
| html: | ||
| - zensical build | ||
| post_build: | ||
| - mkdir -p $READTHEDOCS_OUTPUT/html/ | ||
| - cp --recursive build/html/* $READTHEDOCS_OUTPUT/html/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,11 +40,11 @@ test: ## Test the code with pytest. | |
|
|
||
| .PHONY: docs-test | ||
| docs-test: ## Test if documentation can be built without warnings or errors | ||
| @uv run mkdocs build -s | ||
| @uv run zensical build -s | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Updated the |
||
|
|
||
| .PHONY: docs | ||
| docs: ## Build and serve the documentation | ||
| @uv run mkdocs serve | ||
| docs: ## Build and serve the documentation (and open in default browser) | ||
| @uv run zensical serve -o | ||
|
|
||
| .PHONY: build | ||
| build: clean-build ## Build wheel file | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ See the [Links](https://www.markdownguide.org/basic-syntax/) Markdown syntax doc | |
|
|
||
| ## API Documentation | ||
|
|
||
| The API documentation is mostly pulled from docstrings in the source code using the MkDocs | ||
| The API documentation is mostly pulled from docstrings in the source code using the Zensical | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 The documentation now correctly refers to the Zensical plugin for |
||
| [mkdocstrings](https://mkdocstrings.github.io/) plugin. | ||
|
|
||
| When using `mkdocstrings`, it must be preceded by a blank line before and after, i.e.: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| document.addEventListener("DOMContentLoaded", function (event) { | ||
| // Trigger Read the Docs' search addon instead of Material MkDocs default | ||
| // Trigger Read the Docs' search addon instead of Zensical default | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Updated comment to reflect Zensical as the default. |
||
| document.querySelector(".md-search__input").addEventListener("focus", (e) => { | ||
| const event = new CustomEvent("readthedocs-search-show"); | ||
| document.dispatchEvent(event); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.