跳到正文
我的项目
本页目录

本页还没有翻译,下面是 English 版本。

Writing docs#

These pages use the Sumi theme for MkDocs NG. Everything is plain Markdown, so the files read well on GitHub too.

Preview locally#

pip install -r requirements.txt
mkdocs serve                  # http://127.0.0.1:8000/, Chinese under zh/
mkdocs serve --language zh    # only Chinese, faster

Where things live#

  • docs/English pages
    • index.mdhome page (data in front matter)
    • guide/
    • reference/
    • releases.mdrelease page, filled from releases.yml
    • releases.yml
    • blog/
      • .authors.yml
      • posts/one file per post, named YYYY-MM-DD-slug.md
  • docs-zh/Chinese pages, same layout
  • mkdocs.ymlsettings for both languages

Components#

You write You get
> [!NOTE] A callout. Also TIP, IMPORTANT, WARNING, CAUTION.
A numbered list + {.steps} A procedure with numbered steps. Indent step content by 4 spaces.
A list of links + {.cards} A grid of cards.
Code fences with {tab="…"} Tabs.
A table + {.fields} A parameter reference.
```mermaid A diagram.
```filetree A file tree.
$E = mc^2$ Math.
++Ctrl+K++ Keys.

See the Sumi component guide for all of them.

Before you open a pull request#

mkdocs build --strict

--strict turns broken links and missing pages into errors. CI runs the same command.

Esc
↵ 打开 ↑↓ 移动 Esc 关闭
键盘快捷键
Ctrl K /
打开搜索与命令面板
t
切换深色模式
[ ]
上一页 / 下一页
j k
上一个 / 下一个标题
?
显示本帮助