Repository navigation
docs: move the reference from Sphinx to Zensical - #5
Merged
Merged
Conversation
Zensical, from the Material for MkDocs maintainers, replaces Sphinx and furo. zensical.toml at the root configures the site: the README included between two Snippets markers (what the library is, install, use, the policy table, what it does and does not do), api.md with mkdocstrings entries for everything the package exports, sillybos.pillow and the errors a caller can catch, and cli.md, which runs the parser at build time through markdown-exec to print the command's help. The advisories guide stays a page. Strict mode is on in the config, so a docstring that does not render or a reference to an undocumented name fails the build. The docstrings were written for Sphinx, with reStructuredText roles and double-backtick literals; mkdocstrings reads Google style but Markdown markup, so every role is now a Markdown cross-reference ([Policy][sillybos.Policy]) where the target is on the API page and plain code where it is not, the literals are single backticks, and the two literal blocks are fenced. griffe keeps `sillybos.check` as the module, so the function is documented from sillybos.check.check and headings carry short names. Continuation lines of two Returns blocks are indented as griffe's parser expects, where napoleon's did not mind. docs.yml installs the docs extra and runs `zensical build --clean --strict`; the deploy job is unchanged. The extra is zensical, mkdocstrings-python and markdown-exec, uv.lock is regenerated, and CONTRIBUTING.md and AGENTS.md name the new command and the docstring conventions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The reference at https://scattercode.github.io/sillybos/ is now built by Zensical (0.0.74) instead of Sphinx. Same shape of site: the README included rather than copied, then the API and the command line generated from the code.
zensical.tomlreplacesdocs/conf.py.index.mdincludes the README between two Snippets markers;api.mdis mkdocstrings entries for the exports,sillybos.pillowand the catchable errors;cli.mdprints the parser's help at build time through markdown-exec. The advisories guide stays a page.strict = true, so a docstring that renders badly or a cross-reference to an undocumented name fails the build.:class:Policy`` became[Policy][sillybos.Policy]throughout `src/`, double-backtick literals became single, and the two literal blocks are fenced. The wording is unchanged. Two `Returns:` blocks have their continuation lines indented, which griffe's parser needs where napoleon's did not.sillybos.checkis both the function and the module it lives in, and griffe keeps the module under that name, so the function is documented fromsillybos.check.checkand headings show short names. Renaming the module would remove the wart; left alone here.docs.ymlrunszensical build --clean --strict; the Pages deploy job is unchanged. Thedocsextra is nowzensical,mkdocstrings-pythonandmarkdown-exec;uv.lockregenerated.CONTRIBUTING.mdandAGENTS.mdname the new command and the docstring conventions.Trade-offs worth knowing
>=0.0.74and the lockfile pins the exact version, so an upgrade is a deliberateuv lock -U.--helptext, since there is no sphinx-argparse equivalent; it is still generated, never typed.Checks
ruff check .,ruff format --check .,mypy,pytest --cov(98%, 326 passed),uv lock --check,uvx zizmor --min-severity medium .github/workflowsandzensical build --clean --strictall pass locally; the site was checked in a browser.🤖 Generated with Claude Code