-
Notifications
You must be signed in to change notification settings - Fork 129
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 1 commit
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,2 +1,2 @@ | ||
| # Markdown documentation files with non-standards syntax for mkdocstrings that Prettier should not auto-format | ||
| # Markdown documentation files with non-standard syntax for mkdocstrings that Prettier should not auto-format | ||
|
tleonhardt marked this conversation as resolved.
|
||
| docs/features/initialization.md | ||
| 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.
|
||
| # See https://docs.readthedocs.com/platform/stable/intro/zensical.html for details | ||
|
|
||
| # Required | ||
| version: 2 | ||
|
|
@@ -10,17 +10,19 @@ 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.
|
||
| jobs: | ||
| 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 | ||
| build: | ||
| html: | ||
| - zensical build | ||
| post_build: | ||
| - mkdir -p $READTHEDOCS_OUTPUT/html/ | ||
| - cp --recursive site/* $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 | ||
|
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 |
||
| @uv run mkdocs serve | ||
| @uv run zensical serve | ||
|
|
||
| .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 |
|---|---|---|
|
|
@@ -27,8 +27,8 @@ example to learn more about how to use the various `cmd2` argument processing de | |
| `cmd2` provides the following [decorators](../api/decorators.md) for assisting with parsing | ||
| arguments passed to commands: | ||
|
|
||
| - `cmd2.decorators.with_argparser` | ||
| - `cmd2.decorators.with_argument_list` | ||
| - [cmd2.decorators.with_argparser][] | ||
|
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. 🟢 Using linked references for decorators improves readability and navigation within the documentation. |
||
| - [cmd2.decorators.with_argument_list][] | ||
|
|
||
| All of these decorators accept an optional **preserve_quotes** argument which defaults to `False`. | ||
| Setting this argument to `True` is useful for cases where you are passing the arguments to another | ||
|
|
||
| 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.