本页目录
本页还没有翻译,下面是 English 版本。
Blog#
Every Markdown file under docs/blog/ is a post. Sumi generates the blog index, keeps posts out of the sidebar, and writes an Atom feed. You don't need another plugin.
docs/
blog/
- .authors.ymloptional: author names and avatars
- index.mdoptional: the blog's title and intro
posts/
- 2026-11-01-introducing-sumi.md
- 2026-11-15-search.md
See it on this site's blog.
Writing a post#
---
date: 2026-11-01
authors: [xianpeng]
tags: [release, design]
description: Sumi 0.1 is out.
---
# Introducing Sumi
The first paragraph is the excerpt shown on the index.
<!-- more -->
The rest of the post.
datedateupdateddateauthorslist.authors.yml, or plain names.tagslistcategories is accepted too.descriptionstring<!-- more --> is used.imagestringdocs/. Shown at the top of the post, on its card in the card view, and as the preview when the post is shared. Set hide_cover: true to keep it off the post itself.draftbooleanAuthors#
authors:
xianpeng:
name: Xianpeng Shen
description: Maintainer
avatar: https://github.com/shenxianpeng.png
url: https://github.com/shenxianpeng
The format is the same as the Material blog plugin's, so an existing file can be reused.
The index page#
Without docs/blog/index.md, Sumi creates one titled "Blog". To add an introduction, create the file; any Markdown in it is shown above the list of posts. Tag filters appear when posts have tags, and a filter can be linked to as blog/#tag=release.
List and card views#
The index shows posts as a list, or as a grid of cards with cover images. Readers can switch with the buttons next to the tag filters; their choice is remembered. Pick the default with blog.layout:
plugins:
- sumi:
blog:
layout: cards # or list (the default)
A post without an image gets a cover drawn from the accent colour and its first tag.
Feed#
An Atom feed is written to blog/feed.xml and linked from every page's <head>, so feed readers find it from any URL. It needs site_url to produce absolute links.
Options#
plugins:
- sumi:
blog:
dir: blog # folder under docs/ that contains posts
feed: true
feed_items: 20
layout: list # or cards