Skip to content

Migrate the website to Zensical - #842

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

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

Conversation

@kattni

@kattni kattni commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

This PR moves the website and the docs.beeware.org redirect site from MkDocs to Zensical 0.1.0.

This depends on beeware/beeware-docs-tools#288. Until that PR merges, pyproject.toml pins beeware-docs-tools to its branch (kattni/beeware-docs-tools@tooling/zensical-migration), with a TEMPORARY comment. Once beeware/beeware-docs-tools#288 merges, the pin goes back to beeware/main.

Configuration

  • The MkDocs configs (docs/config.yml and docs/mkdocs.<lang>.yml) were converted with docs-tools' convert_mkdocs_config. The result is docs/zensical.toml plus one docs/zensical.<lang>.toml per language. docs-tools merges them at build time into docs/_build.<lang>.toml, which is gitignored.
  • Zensical's built-in emoji extension renders the Font Awesome icons.
  • tox.ini no longer sets the MkDocs 2 warning env vars.
  • The README now says the site is built with Zensical.

Macros and content

Zensical reimplements mkdocs-macros, but macros no longer get the page's files or the navigation, and each page gets a fresh environment.

  • Team details: these moved out of news/.authors.yml into a new news/.team.yml, so .authors.yml only holds the fields the blog uses. macros.py merges the two files.
  • Team page and homepage sidebar: they now read the bios and post metadata straight from the docs directory. generate_team_members() no longer takes page, and latest_news() and upcoming_events() take no arguments.
  • Event posts: event details are read as dictionaries. Dates work whether YAML returns a date or a string.
  • Icons: fa() returns Font Awesome emoji shortcodes. A CSS override keeps the icons the same size as the text, as they were before.
  • Links: two links that used autorefs now use docs-relative absolute links (/about/team.md#kattni). Autorefs links put <!-- zensical:autoref:N --> placeholders in the RSS feed instead of the link text. The links on the pages work the same.
  • Duplicate post: removed news/posts/2024/events/pycon-us-2023.md. It was identical to the 2023 post, and its "next post" link pointed at itself.

docs-redirect

  • The docs.beeware.org redirect site now builds with Zensical, which supports redirect_maps natively. mkdocs-redirects is no longer needed.
  • docs-redirect/mkdocs.yml is replaced by docs-redirect/zensical.toml.
  • Its RTD config installs the new docs-redirect dependency group (just zensical). The redirects group is gone.
  • The built index.html is byte-identical to the MkDocs build's. The 404 page is unchanged.

Verification

  • tox -e docs-en and tox -e docs-de pass in strict mode, with docs-tools at b3a1e03. No pages have macro errors.
  • The docs-redirect build passes in strict mode, using a fresh venv set up the way its RTD config does it.
  • All 33 redirects produce pages byte-identical to the MkDocs build.
  • The generated event-post text matches the MkDocs build for all 48 event posts.
  • Translated nav labels and hide: navigation match, and RTL rendering works in ar.
  • RSS items match the MkDocs build. The broken <image><url>None</url> element is gone.
  • tox -e pre-commit passes.

Weblate

Lock Weblate and sync it before merging this. This PR doesn't edit any translations.po file directly. However, it changes translatable English strings: the generate_team_members(...) lines in about/team.md, plus index.md. So the next translation update will rewrite every translations.po.

Notes for reviewers

  • The real Read the Docs builds haven't run yet: the main site waits on the docs-tools pin, and docs-redirect runs on its own RTD project. The docs-redirect RTD config was only tested locally.
  • [tool.rumdl] flavor = "mkdocs" is unchanged. It sets the Markdown dialect for the linter, not the build tool.
  • Autorefs reference links in a news post still leak placeholders into the RSS feed; this is a Zensical bug. This repo has none left. The shared docs-tools content still has some in-page autoref anchors, but those pages aren't news posts.
  • RSS: the channel image is still commented out (# image = ...), as it was in the MkDocs config. Zensical leaves out the <image> element, where MkDocs used to emit a broken one.

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)

The 2024 copy was identical to the 2023 post, and made the post link to
itself as the next post.
- Split the team details out of .authors.yml into .team.yml, so .authors.yml
  only has the fields the blog uses. The macros merge the two.
- Read team bios and post metadata from the docs directory, since Zensical
  doesn't give macros the page files or navigation.
- Use dict access for event details, and accept dates as strings or dates.
- Emit Font Awesome icons as emoji shortcodes, and keep them text-sized.
- Use docs-relative absolute links instead of autoref reference links, which
  leave placeholders in the RSS feed.
- Convert the MkDocs configs to Zensical TOML (zensical.toml, plus one file
  per language).
- Build docs-redirect with Zensical, which handles redirects natively.
- Pin beeware-docs-tools to the Zensical migration branch (temporary).
- Drop the MkDocs 2 warning env vars and the mkdocs-redirects dependency.

This branch has not been deployed

No deployments
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