Skip to content
New to Sumi? Read the introduction.
Sumi
On this page

Style presets#

A style preset changes the whole look of a site in one line: fonts, colours, headings, code, tables and callouts. It is the author's choice, set in mkdocs.yml; readers don't get a switch, so the site looks the way you meant it to.

mkdocs.yml
theme:
  name: sumi
  style: paper
Style For Looks like
sumi Documentation and product sites The default: Inter, warm paper white and a vermilion accent.
paper Blogs, essays, books, long reading A serif page on cream paper, a longer line spacing, ink links with an accent underline.
github Project docs that should feel like the repository The README look: system fonts, white page, underlined headings, GitHub-style alerts and tables.

Every preset has a light and a dark version, works in every language Sumi supports and changes nothing else: the same Markdown, components, layout and scripts. Leaving style out, or setting sumi, keeps the site exactly as it was.

Sumi#

A documentation page in the Sumi style

Paper#

For writing meant to be read from top to bottom. Body text and headings are set in a serif, slightly larger and with more space between lines; the text column is a little narrower, so a line holds about as many words as a printed book. Tables, field references, labels and captions stay in the sans-serif, where it reads better at small sizes.

A blog post in the Paper style

No font is downloaded. Paper uses the reader's own serif: Iowan Old Style or Charter on Apple devices, Cambria or Georgia on Windows, Noto Serif on Linux and Android, and Songti or Noto Serif CJK for Chinese.

GitHub#

For a project whose readers live on GitHub. The site looks like a rendered README: the system's own fonts, a white page (or GitHub's dark one), headings with a rule underneath, grey code blocks, bordered tables and alerts with a coloured bar. Its accent is GitHub's blue.

A documentation page in the GitHub style

Accent colour#

Each preset brings its own accent: paper keeps vermilion and github uses blue. An accent set in mkdocs.yml wins over the preset's:

mkdocs.yml
theme:
  name: sumi
  style: paper
  accent: indigo

One page in another style#

A page can pick its own preset in its front matter, for example an essay or a release story on a documentation site:

docs/blog/posts/why-we-rewrote-it.md
---
style: paper
---

Your own adjustments#

A preset is a set of CSS variables on <html data-style="…">. To adjust one, override its variables in custom CSS:

docs/stylesheets/extra.css
[data-style="paper"] {
  --sumi-content-w: 40rem;   /* a shorter line */
  --sumi-bg: #fbf9f3;        /* a lighter paper */
}

Readers can still widen the text on a wide screen with the page menu or the = key; see Reading width.

Reference#

What Details
Option theme.style: sumi (default), paper or github. style: in front matter for one page.
Output data-style="paper" or data-style="github" on <html>, and that preset's stylesheet (about 1.5 KB compressed), loaded only on the pages that use it. Nothing for sumi.
JavaScript None.
Limits One preset per page. A preset doesn't load web fonts; it uses fonts installed on the reader's system.
Esc
↵ to open ↑↓ to move Esc to close
Keyboard shortcuts
Ctrl K /
Open search and commands
t
Toggle dark mode
[ ]
Previous / next page
j k
Previous / next heading
- =
Narrower / wider text
o
Collapse or expand all
b
Bilingual view
?
Show this help
Bilingual view
English
简体中文