Skip to content

Build the documentation site with the Sumi theme - #133

Merged
shenxianpeng merged 4 commits into
mainfrom
claude/project-thread-8gce4u
Nov 1, 2026
Merged

shenxianpeng merged 4 commits into
mainfrom
claude/project-thread-8gce4u

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

MkDocs NG's own documentation now uses Sumi, the theme from the mkdocs-ng organization. Using it every day on a large site with mkdocstrings, literate-nav, redirects and mkdocs-click is the best way to find what it still lacks; the first round of gaps is already fixed in mkdocs-sumi#3 (to be released as 0.1.1).

Changes

  • mkdocs.yml: theme: sumi with the MkDocs NG logo (light and dark variants from Give the README a MkDocs NG header and add the logo files #132) and favicon, plus the sumi plugin. Code is highlighted with Pygments at build time instead of highlight.js. The Google Analytics ID inherited from mkdocs.org is gone; it contradicted "no analytics" in the README.
  • Home page: a Sumi landing page described in front matter (hero, features, "switching is a package change", call to action), replacing the Bootstrap cards and buttons. The Markdown body keeps the links for search and the Markdown copy of the page.
  • Bootstrap-only markup: the theme screenshots carousel on "Choosing your theme" is two plain images, and the plugin events diagram uses a plain <details>.
  • getting-started.md: the "MkDocs favicon" link pointed at a file the mkdocs theme used to provide; it now points at the file in the repository.
  • extra.css: only the rules that still apply (colour for NEW: callouts, hidden attribute labels in the API reference).
  • pyproject.toml: the docs environment installs mkdocs-sumi, which the hatch-mkdocs collector can't look up from mkdocs.yml. It accepts 0.1.0, the version on PyPI today, which builds the site too; the dark logo and the API reference styling arrive with 0.1.1, which the next docs build picks up once it is released.
  • Integration test: it builds this site with each built-in theme. It now does that from a generated copy of mkdocs.yml (next to it, so mkdocstrings finds this repository rather than upstream MkDocs) with the built-in theme and without the sumi plugin, plus a small hook that lets pages using Sumi's page templates (the home page) fall back to main.html. So the built-in themes are still tested on the full docs site, and the integration environment doesn't need Sumi.

The built-in mkdocs and readthedocs themes are unchanged and still documented; this only changes the theme of this site.

Checks

  • hatch run docs:build passes with mkdocs-sumi 0.1.0 from PyPI; mkdocs build --strict passes with mkdocs-sumi from main (0.1.1).
  • python -m mkdocs.tests.integration passes (both built-in themes and the test projects), also with upstream MkDocs installed alongside, as in CI.
  • Checked the home page, Getting Started, Configuration, CLI, Plugins and the API reference in light, dark and at phone width.

Checklist

  • New tests added for new behavior (if applicable): n/a, docs only
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable): n/a, no change to the package

MkDocs NG's own site now uses Sumi, the theme from the mkdocs-ng
organization, so that the theme is used every day on a large site.

- mkdocs.yml: theme sumi plus the sumi plugin, with the MkDocs NG logo
  (light and dark) and favicon; Pygments highlighting instead of
  highlight.js; drop the Google Analytics ID inherited from mkdocs.org,
  which contradicted "no analytics".
- The home page is a Sumi landing page described in front matter,
  replacing the Bootstrap cards and buttons.
- Replace the Bootstrap carousel and card markup on two pages, point the
  favicon link at the file in the repository, and trim extra.css to the
  rules that still apply.
- The docs environment installs mkdocs-sumi.
The integration test builds the documentation site with each built-in
theme. Now that the site uses Sumi, that failed: the sumi plugin isn't
installed in the integration environment, and the home page uses Sumi's
landing.html template.

Build from a copy of mkdocs.yml with the built-in theme and without the
sumi plugin, plus a hook that lets pages using Sumi's page templates fall
back to main.html.
mkdocstrings resolves its search paths relative to the configuration
file. From a temporary directory it found upstream MkDocs, which CI
installs alongside, instead of this repository, and couldn't collect
mkdocs.build.
@codspeed

codspeed Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 29 untouched benchmarks


Comparing claude/project-thread-8gce4u (209f5e7) with main (d20e77b)

Open in CodSpeed

0.1.1 isn't on PyPI yet. 0.1.0 builds the site too (without the dark
logo and the API reference styling), and the next docs build picks up
0.1.1 once it is released.
@shenxianpeng
shenxianpeng merged commit e2ca8ba into main Nov 1, 2026
24 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-8gce4u branch November 1, 2026 14:41
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