跳到正文
Sumi 中文文档已上线,部分页面暂为英文。阅读 Sumi 介绍
Sumi
本页目录

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

Fields#

Configuration options and API parameters are usually written as a table, and tables become hard to read once descriptions grow. Add {.fields} and Sumi turns each row into a reference entry: the name and its type, default and required flag on one line, the description underneath.

| Name | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `site_name` | string | | yes | The title of the site, used in the header and in every page title. |
| `site_url` | string | `null` | | The canonical address of the built site. Required for the sitemap, the feed and `llms.txt`. |
| `strict` | boolean | `false` | | Stop the build on any warning, such as a broken link. |
{.fields}
site_namestringrequired
The title of the site, used in the header and in every page title.
site_urlstringDefault null
The canonical address of the built site. Required for the sitemap, the feed and llms.txt.
strictbooleanDefault false
Stop the build on any warning, such as a broken link.

Which columns are metadata#

The first column is always the name. Columns headed Type, Default and Required (or 类型, 默认值, 必填) become chips next to it. Every other column becomes part of the description.

To choose the metadata columns yourself, list their headings in meta:

{.fields meta="type since"}
idintegerSince 1.0
Unique identifier of the release.
assetslistSince 1.2
Files attached to the release, with their size and SHA-256 checksum.

Linking to a field#

Each entry keeps the content of its name cell, so you can add an anchor with attr_list:

| `strict`{#strict} | boolean | `false` | Stop on warnings. |

The Markdown copy of the page keeps the original table.

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