---
name: sumi-site
description: "Build, migrate and polish MkDocs documentation sites on the Sumi theme (mkdocs-sumi, docs at sumi.mkdocs-ng.org) with MkDocs NG: product and open-source docs, landing pages, blogs, bilingual sites. Use when creating a Sumi site, moving a site from Material for MkDocs or another MkDocs theme to Sumi, writing pages with Sumi's Markdown components, adding a second language, or checking and deploying a Sumi site. Points each task to the Sumi docs page that explains it. Not for changing the theme itself."
---

# Building sites with Sumi

> Public edition of the Sumi site-building skill: <https://sumi.mkdocs-ng.org/skill.md>.
> Save it as `SKILL.md` in a `sumi-site/` skills folder, or hand the URL to an agent.

This file is a map. It says what Sumi offers and which page of the documentation explains each task. Open those pages when you need the details; every page also has a plain Markdown copy at the same address with `.md` instead of the trailing `/`, and <https://sumi.mkdocs-ng.org/llms.txt> lists them all.

## What Sumi is

Sumi is a documentation theme and plugin for [MkDocs NG](https://mkdocs-ng.org/), the maintained fork of MkDocs 1.x. A Sumi site is an ordinary MkDocs project: `mkdocs.yml`, a `docs/` folder of Markdown, and nothing else. Fonts, icons, search, diagrams, charts and math ship inside the Python package, so a built site loads nothing from other servers.

```sh
pip install mkdocs-sumi        # installs MkDocs NG too; Python 3.10+
```

```yaml
# mkdocs.yml
site_name: My Project
site_url: https://example.com/
repo_url: https://github.com/me/my-project
theme:
  name: sumi
plugins:
  - search      # list it: a plugins: list turns off the default
  - llms_txt    # optional: llms.txt and a Markdown copy of every page
  - sumi
```

To start from a working site with docs, a blog and English and Chinese pages, use the template <https://github.com/mkdocs-ng/sumi-starter>.

## Write with native Markdown

Every component is plain Markdown, sometimes followed by one attribute line in braces. The source still reads well on GitHub and in the Markdown copy agents read. Prefer these to raw HTML.

| Component | Write | Docs |
| --- | --- | --- |
| Callout | `> [!NOTE]`, `> [!TIP] Title`, `> [!WARNING]-` (folded) | [callouts](https://sumi.mkdocs-ng.org/docs/write/callouts/) |
| Code with a file name | ```` ```py title="app.py" ```` | [code](https://sumi.mkdocs-ng.org/docs/write/code/) |
| Tabs | adjacent fences with `{tab="Linux"}` | [tabs](https://sumi.mkdocs-ng.org/docs/write/tabs/) |
| Steps | ordered list + `{.steps}` | [steps](https://sumi.mkdocs-ng.org/docs/write/steps/) |
| Timeline | definition list + `{.timeline}` | [timelines](https://sumi.mkdocs-ng.org/docs/write/timeline/) |
| Changelog entry | heading + `{.update date="YYYY-MM-DD" tags="A, B"}` | [updates](https://sumi.mkdocs-ng.org/docs/write/timeline/#update-entries) |
| Cards | bullet list of links + `{.cards}` | [cards](https://sumi.mkdocs-ng.org/docs/write/cards/) |
| Parameter reference (every row gets an anchor and a search result) | table + `{.fields}` | [fields](https://sumi.mkdocs-ng.org/docs/write/fields/) |
| Table options | table + `{.wide}`, `{.compact}`, `{caption="…"}` | [tables](https://sumi.mkdocs-ng.org/docs/write/tables/) |
| Figure, gallery | image + `{caption="…"}`; list of images + `{.gallery}` | [images](https://sumi.mkdocs-ng.org/docs/write/images/), [galleries](https://sumi.mkdocs-ng.org/docs/write/gallery/) |
| Video | `![Demo](demo.mp4)`; `{.autoplay}` for a silent loop | [video](https://sumi.mkdocs-ng.org/docs/write/images/#video) |
| File tree | ```` ```filetree ```` | [file trees](https://sumi.mkdocs-ng.org/docs/write/filetree/) |
| Diagram, chart, mind map | ```` ```mermaid ````, ```` ```echarts ````, ```` ```markmap ```` | [diagrams](https://sumi.mkdocs-ng.org/docs/write/diagrams/), [charts](https://sumi.mkdocs-ng.org/docs/write/charts/) |
| Math | `$…$`, `$$…$$` | [math](https://sumi.mkdocs-ng.org/docs/write/math/) |
| Keys, icons, badges | `++Ctrl+K++`, `:lucide-rocket:`, `**New**{.badge}` | [keys and icons](https://sumi.mkdocs-ng.org/docs/write/keys-icons/) |

Indent content inside a step, tab or definition by four spaces.

## Pages beyond docs

- **Home page**: `template: landing.html` and the hero and sections in front matter (features, split, stats, steps, FAQ, call to action, latest posts). [Landing pages](https://sumi.mkdocs-ng.org/docs/pages/landing/)
- **Blog**: every Markdown file under `docs/blog/` is a post, with `date`, `authors`, `tags` and an Atom feed. No other plugin. [Blog](https://sumi.mkdocs-ng.org/docs/pages/blog/)
- **Releases**: a page read from GitHub Releases and PyPI. [Releases](https://sumi.mkdocs-ng.org/docs/pages/releases/)
- **Print edition**: the whole site as one printable page. [Print](https://sumi.mkdocs-ng.org/docs/pages/print/)

## Common tasks

| Task | Where |
| --- | --- |
| Move from Material for MkDocs | [Migrating from Material](#migrating-from-material-for-mkdocs) below |
| Accent colour, logo, header links, footer, announcement | [Theme options](https://sumi.mkdocs-ng.org/docs/customize/theme/) |
| A blog, essays or a book: `style: paper`; a README look: `style: github` | [Style presets](https://sumi.mkdocs-ng.org/docs/customize/styles/) |
| Navigation, tabs, section index pages | [Navigation](https://sumi.mkdocs-ng.org/docs/customize/navigation/) |
| A second language: one `mkdocs.yml` with a `languages:` key (MkDocs NG 1.11+) | [Languages](https://sumi.mkdocs-ng.org/docs/customize/i18n/) |
| Deploy to GitHub Pages, Cloudflare Pages, Netlify | [Deploy](https://sumi.mkdocs-ng.org/docs/run/deploy/) |
| Analytics, page feedback, comments | [Analytics](https://sumi.mkdocs-ng.org/docs/run/analytics/), [comments](https://sumi.mkdocs-ng.org/docs/run/comments/) |
| Override a template | [Overrides](https://sumi.mkdocs-ng.org/docs/customize/overrides/) |

## Migrating from Material for MkDocs

Sumi guarantees that a Material site builds after a two-line change. It reads what it can (palette, `!!! note`, `pymdownx.*`, grid cards, blog posts, `mike`, Material's `blog` and `tags` plugins) and logs one INFO line for everything it reads differently or skips. Your job is to turn the site into a clean Sumi site, using that log as the to-do list. Background: [Migrate](https://sumi.mkdocs-ng.org/docs/start/migrate/).

1. Switch: `theme.name: sumi`, add `- sumi` at the end of `plugins`, and replace `mkdocs-material` with `mkdocs-sumi` in the requirements. Keep every plugin that isn't Material's.
2. Build and collect the to-do list: `mkdocs build 2>&1 | grep -i material`. Run it again after each step below.
3. Rewrite what the log names:

| Material | Sumi |
| --- | --- |
| `theme.palette` list | `palette: auto` (or `light`, `dark`) and `accent:` ([accent colours](https://sumi.mkdocs-ng.org/docs/customize/theme/#accent-colours)) |
| `theme.features` | `navigation_tabs`, `toc_depth`, `hide` ([theme options](https://sumi.mkdocs-ng.org/docs/customize/theme/)); delete the rest |
| `theme.icon`, `theme.font` | Delete; `repo_icon` if the repository icon is wrong |
| `pymdownx.emoji` with `emoji_index`/`emoji_generator: !!python/name:material…` | Delete those two lines, or the whole extension if the site uses no emoji |
| `:material-x:`, `:octicons-x-16:`, `:fontawesome-solid-x:` | `:lucide-x:` with the closest [Lucide](https://lucide.dev/icons/) name; drop `{ .lg .middle }` |
| `:fontawesome-brands-x:`, `:simple-x:` | `:brand-x:` ([keys and icons](https://sumi.mkdocs-ng.org/docs/write/keys-icons/)) |
| Plugins `social`, `privacy`, `offline`, `optimize`, `typeset`, `info`, `projects`, `group` | Delete. `social` → `theme.social_image`; plugins nested in `group` → list them under `plugins` if still wanted |
| `blog` plugin | Delete it; move `blog_dir` to `sumi: blog: dir:` ([blog](https://sumi.mkdocs-ng.org/docs/pages/blog/)) |
| `tags` plugin and `<!-- material/tags -->` | Keep for now (Sumi lists tagged pages at the marker), or delete both |
| `meta` plugin `.meta.yml` | Copy its keys into each page's front matter |
| `material.extensions.preview` | Delete |
| Code annotations `# (1)!` + list | Move each note into the text after the block, or a `{.steps}` list |
| `<div class="grid cards" markdown>` | A link list with `{.cards}` ([cards](https://sumi.mkdocs-ng.org/docs/write/cards/)); the old markup still works |
| `custom_dir` `main.html` `announce` block | `theme.announcement` |
| `partials/comments.html` (giscus) | `theme.comments` ([comments](https://sumi.mkdocs-ng.org/docs/run/comments/)); delete the partial |
| `partials/footer.html`, `partials/copyright.html` | `copyright:` and `theme.footer_links`; delete the partials |
| A custom home page (`home.html` with `tabs`/`hero` blocks) | `template: landing.html` with `hero:` and `sections:` front matter ([landing pages](https://sumi.mkdocs-ng.org/docs/pages/landing/)) |
| `extrahead`, `scripts`, `outdated` blocks | Keep; Sumi has them |
| `hide: [navigation]` | `hide: [sidebar]` |

4. Leave `!!! note`, `=== "Tab"` and the other `pymdownx` syntax as they are unless asked: Sumi styles them. Convert them to `> [!NOTE]` and Sumi tabs only when rewriting a page anyway.
5. Done when `mkdocs build --strict` passes, the command in step 2 prints nothing, `custom_dir` is empty or gone, and the pages look right in light and dark mode.

## Taste

- Let Sumi's defaults do the work. Change the accent colour and the logo before writing CSS.
- One idea per page, a title that says what the page is for, and a first paragraph that answers it.
- Use a component only where it carries structure: steps for a procedure, fields for options, a callout for something a reader must not miss. A page of callouts reads as noise.
- Write Chinese pages with English heading anchors (`## 安装 {#install}`), so links work across languages.

## Check and ship

1. `mkdocs build --strict` must finish without warnings.
2. `mkdocs serve`, then read the pages you changed in light and dark mode and at phone width. Press <kbd>⌘</kbd> <kbd>K</kbd> to check that search finds them.
3. Pin `mkdocs-sumi` in `requirements.txt` and deploy with the workflow on the [Deploy](https://sumi.mkdocs-ng.org/docs/run/deploy/) page.

Problems: [Troubleshooting](https://sumi.mkdocs-ng.org/docs/run/troubleshooting/) · issues at <https://github.com/mkdocs-ng/mkdocs-sumi/issues>.
