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

Template overrides#

Sumi is a standard MkDocs theme, so any template can be overridden with custom_dir:

mkdocs.yml
theme:
  name: sumi
  custom_dir: overrides
  • overrides/
    • main.htmlextend blocks for every page
    • partials/
      • footer.htmlreplace one partial

Extending blocks#

Create overrides/main.html and extend base.html:

overrides/main.html
{% extends "base.html" %}

{% block extrahead %}
  <meta name="robots" content="noindex">
{% endblock %}
Block Contains
site_meta <meta> and <link> tags in <head>
htmltitle The <title> element
styles Stylesheets
analytics The analytics snippet
extrahead Empty; for your own tags
header The site header
layout Sidebar, article and table of contents
content The article
page_content The rendered Markdown
article_footer Last updated, edit link, previous / next
footer The site footer
scripts Scripts at the end of <body>

Partials#

Partial Purpose
partials/header.html Logo, tabs, search button, menus
partials/logo.html The logo only
partials/breadcrumbs.html The path above the title
partials/page-actions.html Copy as Markdown and the page menu
partials/toc.html Table of contents
partials/article-footer.html Below the article
partials/footer.html Site footer
partials/palette.html Search and command palette
partials/analytics.html Analytics

Analytics#

Google Analytics is supported with the same keys as Material:

mkdocs.yml
extra:
  analytics:
    provider: google
    property: G-XXXXXXXXXX

For another provider, add its snippet to the analytics block in overrides/main.html.

Note

Analytics is the one feature that contacts a third party. It is off unless configured.

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
?
Show this help