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

Your first site#

This page builds a small site from scratch: a home page, two guide pages and a blog post.

  1. Create the project

    mkdocs new my-docs
    cd my-docs
    
  2. Lay out the files

    • my-docs/
      • docs/
        • index.mdHome page
        • guide/
          • index.mdSection landing, linked from the sidebar title
          • install.md
        • blog/
          • posts/
            • hello.mdAny page under blog/ is a post
      • mkdocs.ymlSite configuration
  3. Configure the site

    mkdocs.yml
    site_name: My Docs
    site_url: https://example.com/
    repo_url: https://github.com/me/my-docs
    
    theme:
      name: sumi
    
    plugins:
      - search
      - sumi
    
  4. Preview and build

    mkdocs serve        # live preview
    mkdocs build        # writes static files to site/
    

How navigation is built#

Top-level sections become tabs in the header. Pages inside the active tab appear in the sidebar. A section whose first page is index.md uses that page as its landing: the section title links to it.

Tip

Without a nav: key, MkDocs builds the navigation from your folders. Blog posts are kept out of the sidebar automatically.

Deploy#

mkdocs build writes plain HTML, CSS and JavaScript to site/. Upload that folder to any static host — GitHub Pages, Cloudflare Pages, Netlify, an S3 bucket or an Nginx server. Nothing needs to run after deployment.

mkdocs gh-deploy      # build and push to the gh-pages branch
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