Skip to content

docs: move the reference from Sphinx to Zensical - #5

Merged
stephen-masters merged 1 commit into
mainfrom
docs/zensical
Nov 1, 2026
Merged

stephen-masters merged 1 commit into
mainfrom
docs/zensical

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

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.toml replaces docs/conf.py. index.md includes the README between two Snippets markers; api.md is mkdocstrings entries for the exports, sillybos.pillow and the catchable errors; cli.md prints 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.
  • Docstrings rewritten for mkdocstrings. It reads Google style but Markdown markup, not reStructuredText roles, so :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.check is both the function and the module it lives in, and griffe keeps the module under that name, so the function is documented from sillybos.check.check and headings show short names. Renaming the module would remove the wart; left alone here.
  • docs.yml runs zensical build --clean --strict; the Pages deploy job is unchanged. The docs extra is now zensical, mkdocstrings-python and markdown-exec; uv.lock regenerated.
  • CONTRIBUTING.md and AGENTS.md name the new command and the docstring conventions.

Trade-offs worth knowing

  • Zensical is 0.0.x and releases several times a week; the extra pins >=0.0.74 and the lockfile pins the exact version, so an upgrade is a deliberate uv lock -U.
  • The command line page is the --help text, since there is no sphinx-argparse equivalent; it is still generated, never typed.
  • The page title no longer carries the package version.

Checks

ruff check ., ruff format --check ., mypy, pytest --cov (98%, 326 passed), uv lock --check, uvx zizmor --min-severity medium .github/workflows and zensical build --clean --strict all pass locally; the site was checked in a browser.

🤖 Generated with Claude Code

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>
@stephen-masters
stephen-masters merged commit 3c769b8 into main Nov 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant