Fields
A field list documents named settings: configuration keys, command-line flags, API fields. Each name sits on its own line with small chips for its type, whether it is required and its default, and the description runs underneath at full width, so a long description never gets squeezed into a narrow table column on a phone. Every entry also gets its own anchor, which you can paste into an issue or a chat to point at one setting.
A field list suits reference material. When readers compare many rows across the same columns, keep a plain table; when the content is a sequence of actions, use Steps.
Shortest form
Write a pipe table with at least two columns and put {.fields} on the line
right after it. The first column is the name, the last column is the
description, and every column in between is metadata.
Each metadata cell is shown as “Header: value”. The theme does not read
meaning into header text, so Type here is only a label; to get the standard
chips, assign roles with meta as described in the next section. Cells accept
inline Markdown such as code, emphasis and links, and an empty metadata cell is
left out.
Semantic columns with meta=
meta gives each metadata column a role, in column order: type,
required, default, or - to keep the header as a plain label. With roles
assigned, the table renders the same chips as the shortcode form.
- Write exactly one role per metadata column, which is the column count minus
two. With too many or too few, the build warns and the table renders as if
metawere absent. - Any non-empty
requiredcell means required, and it shows the Englishrequiredchip whether you wrote “yes”, “是” or “✔”. Leave optional rows empty, because “no” and “否” count as required too. typeanddefaultvalues without inline markup of their own are set as code, matching the shortcode form.- The chips always appear in the order
type,required,default, whatever the column order;-columns follow in their own order.
Mix - with roles to keep a column under its own label:
Labels and container IDs
caption puts a visible label above the list and also names it for screen
readers. id sets the ID of the outer container, so you can link to the whole
list or style it from site CSS.
params.ui
Every entry is linkable
Each entry gets a field-<name> anchor, and a link icon appears beside the
name on hover. page_width in the first list on this page, for example, is
#field-page_width. When a name occurs twice on one page,
the second anchor gets -2, the third -3 (unlike headings, which Goldmark
suffixes -1, -2).
To keep an anchor that other pages already link to, give the field
shortcode an explicit id, such as id="guc-work-mem"; an empty, duplicate
or unsafe value warns and falls back to the generated anchor.
Local search indexes each anchored entry, so
searching for a parameter name opens the page at that entry.
The shortcode form
A table cell cannot hold paragraphs, lists or code blocks. When a description
needs them, write the list with the fields and field shortcodes instead.
Common pig flags
Write required=true and default=false without quotes, because quoted they
are strings rather than booleans. default accepts any scalar and shows
default=0 and default="" as written, the empty string as ""; without
default, no default chip appears. Every field needs a non-empty body and
must sit directly inside fields.
Which form to use
| Situation | Use |
|---|---|
| One-sentence descriptions that fit in a table cell | table + {.fields} |
| Descriptions with paragraphs, lists or code blocks | the fields/field shortcode |
| Readers comparing many rows across the same columns | a plain table, not a field list |
| Content that is a sequence of actions | Steps |
Prefer the table form whenever it fits: GitHub still shows it as a readable table, and the page’s Markdown output keeps it as one.
Output
Field lists load no script. Print and RSS show the complete list without entry
anchors, because a print view joins many pages into one document where the
anchors would collide. In the page’s Markdown output the table form stays the
source table, while the shortcode form becomes a bulleted list,
“name — type; required; default: value”, with each description indented
beneath its entry.
Parameter reference
The table attribute line, on the line right after the table:
The fields shortcode:
The field shortcode:
Limits
- The first column must be non-empty and unique within the table; a row with an empty or duplicate name warns and is skipped.
.fieldscannot be combined with.matrix,.full-width,.expandornum, andmetaworks only on a table that has.fields.- Table cells cannot hold block content; switch to the shortcode form for paragraphs, lists and code blocks.
requiredanddefaultstay in English in every language, because they are API vocabulary rather than interface text.- There is no
kind,since,deprecatedorlocationmetadata, no per-field link and no nesting, and nothing is generated from TypeScript or OpenAPI schemas.
Related
- Tables — the rest of the attribute line and the exclusion rules
- Configuration — the full site parameter table, itself a field list
- Front matter — the full front matter table
- Steps — ordered actions do not belong in a field list