Skip to content

Migrate docs build to Zensical - #4868

Open
kattni wants to merge 3 commits into
beeware:mainfrom
kattni:tooling/zensical-migration
Open

kattni wants to merge 3 commits into
beeware:mainfrom
kattni:tooling/zensical-migration

Conversation

@kattni

@kattni kattni commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Migrates Toga's documentation build from MkDocs to Zensical (0.1.0), using the Zensical support in beeware-docs-tools.

Depends on beeware/beeware-docs-tools#288. Until that merges, the docs dependency group pins beeware-docs-tools to the migration branch (kattni/beeware-docs-tools@tooling/zensical-migration), with a TEMPORARY comment. The pin will be reverted to beeware-docs-tools main once #288 merges, before this PR is merged.

Changes

  • Configuration: docs/config.yml and docs/mkdocs.en.yml are converted to docs/zensical.toml and docs/zensical.en.toml with docs-tools' convert_mkdocs_config.
  • Navigation: the literate-nav docs/en/SUMMARY.md is replaced by an explicit nav in zensical.toml. Its wildcard sections (tutorial/*, topics/* and the reference/api/* subsections) are expanded to explicit page lists.
  • Snippets: the exclude plugin is replaced by core exclude_docs = "snippets/".
  • Dependencies: mkdocs-redirects and mkdocs-exclude are dropped from the docs group; Zensical implements both natively. The redirects configuration is unchanged.
  • tox: removes the MkDocs 2 warning environment variables and the --source-code arguments (docs-tools now resolves the mkdocstrings paths from the repo root).
  • Housekeeping: .gitignore ignores the generated docs/_build.*.toml configs; the rumdl exclude no longer lists SUMMARY.md; AGENTS.md describes the Zensical setup.

Verification

  • tox -e docs (strict) passes against docs-tools b3a1e03.
  • The output was compared with a MkDocs build of main:
    • All 164 pages are present, and their titles match.
    • The sidebar navigation is identical.
    • All 44 redirects are byte-identical.
    • objects.inv is identical (3,499 entries), and so are the external cross-references to Python and Pillow.
    • There are no broken local links or images.
    • Article text matches on all but 7 pages:
      • 3 are cosmetic: equivalent image paths, and an HTML-escaped autorefs title.
      • 4 are contribution-guide pages whose shared docs-tools content was intentionally updated for the Zensical nav.
  • Visually, the pages match the MkDocs build in light and dark mode. The only visible change is Zensical's compact search button.

Notes for reviewers

  • Nav must now be maintained by hand. New pages have to be added to nav in docs/zensical.toml. Zensical 0.1.0 doesn't implement MkDocs' "page not in nav" (omitted_files) validation, so a page missing from nav builds silently rather than failing the strict build. Is that acceptable, or should we add a check?
  • The docs-tools pin must be reverted before merge, once Migrate the documentation tooling to Zensical beeware-docs-tools#288 lands.
  • rumdl keeps flavor = "mkdocs", because Zensical uses the same Markdown dialect.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Claude Code (Claude Opus 5.5)

Generated with beeware-docs-tools' convert_mkdocs_config. The literate-nav
SUMMARY.md is replaced by an explicit nav in zensical.toml, and the exclude
plugin is replaced by exclude_docs for the snippets directory.
Pins beeware-docs-tools to its Zensical migration branch (temporary, until
that change merges), drops the mkdocs-redirects and mkdocs-exclude plugins
(Zensical implements both natively), removes the MkDocs 2 warning variables
and the no-longer-needed --source-code arguments, and ignores the generated
build configs.
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