NoteThe FreeCAD website uses the
yamlformat for its configuration, front matter and examples, as it is easier to read thantomlorjson. Converters from YAML to TOML or JSON and vice-versa are available online if necessary.
What is a front matter?
Content pages can store custom metadata to enhance their semantics. In most Static Site Generator like Hugo, this is achieved via the front matter fields. The front matter is defined at the top of every content text file such as Markdown in between tags, e.g. --- for YAML.
By default, a title front matter field must be provided for each page. Additionally, many more fields can be specified. Field values can be rather minimal, such as a single string, number, boolean, but can also contain lists (also called slices), maps (also called dictionaries), or even a combination of different nested types.
Front matter fields and values
TODO…
NoteFor all Hugo methods, functions, and default fields, the
CamelCaseformatting is used.For all custom Trigo theme naming and fields,
snake_caseformatting is used instead to help distinguish from official Hugo syntax. CSS classes and IDs use hyphens likecustom-class.
YAML syntax
| Case | Example | Quote? | Comment |
|---|---|---|---|
| Simple string | title: My Blog |
β No | Safe plain string |
| String with colon + space | title: "YAML: The Guide" |
β Yes | Key confusion (YAML: ) |
String with # |
description: "C# basics" |
β Yes | # starts comment |
String starting with * |
alias: "*draft" |
β Yes | * is YAML alias marker |
String starting with & |
key: "&value" |
β Yes | & is YAML anchor |
| URL | baseURL: https://example.com |
β No | Safe URL (: not followed by space) |
| URL with fragment | url: "https://example.com/page#intro" |
β Yes | # starts comment |
| Number | paginate: 10 |
β No | Proper numeric type |
| Leading zero | id: "00123" |
β Yes | Numeric parsing (leading zeros removed) |
| Date | date: 2026-03-03 |
β No | Proper date object |
| Null value | field: null |
β No | Proper null |
| Boolean | draft: true |
β No | Proper boolean |
| Boolean-like word | title: "On" |
β Yes | on is YAML boolean |
| Multiline text | summary: | |
β No | > is folded and | is literal block scalars |
| Inline array | tags: [hugo, blog] |
β No | Safe inline list |
| Block array | - hugo |
β No | Safe block list (more readable than inline) |
Hugo-Specific Cases
| Case | Example | Quote? | Comment |
|---|---|---|---|
| Simple glob pattern | include: "*.md" |
β Yes | * is wildcard |
| Recursive glob pattern | exclude: "**/*.draft.md" |
β Yes | ** is super wildcard |
| Glob slice | matrix: ["! en", "v1.*.*", "{fr, de}"] |
β Yes | Negation, single, list and range |
Sveltia CMS config
| Case | Example | Quote? | Comment |
|---|---|---|---|
| Simple string | label: Blog |
β No | Plain string is safe |
| Folder path | folder: content/blog |
β No | No special YAML chars |
| Boolean field option | required: true |
β No | Must remain boolean |
| Boolean mistakenly quoted | required: "true" |
β No | Becomes string β breaks validation |
| Number field option | max: 10 |
β No | Must remain numeric |
| String that looks boolean | default: "on" |
β Yes | on becomes boolean otherwise |
| Glob pattern | pattern: "*.md" |
β Yes | * is YAML alias symbol |
| Recursive glob | exclude: "**/*.draft.md" |
β Yes | * must be quoted |
| Regex pattern | pattern: "^[a-z0-9-]+$" |
β Yes | Contains [], ^, $, etc. |
| Template variables | slug: "{{slug}}" |
β Yes | {} should be quoted |
| Preview path template | preview_path: "blog/{{slug}}" |
β Yes | Prevent parsing issues |
Value containing # |
default: "C#" |
β Yes | # starts comment |
| Option list (normal) | - draft |
β No | Safe string |
| Option list (boolean-like) | - "on" |
β Yes | Prevent boolean coercion |
| Datetime default | default: 2026-03-03 |
β No | Keeps date type |
| Datetime wrongly quoted | default: "2026-03-03" |
β οΈ Avoid | Becomes string, may break widget |
See Sveltia CMS docs.