options
| Option | Type | Default | Meaning |
|---|---|---|---|
file | text | snippet.html | File inside dir. A .md ending is rendered as Markdown. No effect when html is set. |
dir | text | quartz/static/snippets | Snippet folder, from the site root. Paths beyond it are refused. |
html | text | – | Markup straight in the configuration. Takes precedence over file. |
className | text | – | Extra class(es) next to layout-box. |
title | text | – | Heading as an h3. Placeholders allowed. |
collapsible | yes/no | false | Render as details, title becomes the clickable line. Needs title. |
collapsed | yes/no | false | Start closed. Only with collapsible. |
placeholders | yes/no | true | Replace {{…}}. |
frontmatterKey | text | layoutBox | Field a page uses to steer the box. |
byLang | object | – | Differing options per language. dir and frontmatterKey are not intended there ([[en/7-two-languages/01-bylang |
They are explained in chapter 2 (source),
4 (placeholders), 5 (form),
6 (frontmatter) and 7 (byLang).
layout
Belongs to Quartz, not to the plugin — the same values as for any component.
| Field | Values | Meaning |
|---|---|---|
position | header, left, right, beforeBody, afterBody, footer | Where the box sits |
priority | number, default 15 | Order at that place, smaller is further up |
display | all, desktop-only, mobile-only | At which widths it appears |
group | text | Several components side by side instead of stacked |
Frontmatter
| Spelling | Effect |
|---|---|
<key>: false | hide the box on this page |
<key>: file.html | a different snippet |
<key>: { hidden, file, html, title, collapsible, collapsed } | individual options for this page |
Classes in the markup produced
| Class | Where |
|---|---|
layout-box | on the outer element, always |
layout-box-title | on the heading, only with title |
layout-box-content | on the inner div holding the snippet |
layout-box-missing | on the dashed box, only under --serve |