Serifmark Sign in ·

Front-matter reference

Front-matter is the optional YAML block at the very top of a Markdown Source. It carries the Brand Theme — title, logo, brand colors, header/footer — plus render options. The schema is a strict whitelist: unknown fields and out-of-range values are rejected before any Credit is charged, with an error naming the exact field path.

Getting started · REST & MCP reference · Front-matter reference · Error codes

Minimal example

---
template: report
title: Q3 Field Report
header:
  left: "{title}"
  right: Acme Analytics
footer:
  center: Confidential
page_number: page/total
---

# Q3 Field Report

Body text starts here. The Front-matter block never enters the rendered Document.

Template resolution

Front-matter fields overlay the chosen Template — unset fields simply inherit it. The Template name resolves in this order: the template request parameter (REST) or tool argument (MCP), then the Front-matter template declaration, then default. Lookup covers the built-in Templates first, then your own private Templates; another account's private Template is indistinguishable from a missing one. A name that resolves nowhere returns template_not_found.

Built-in Templatefontfont_sizeline_heightmargins (mm)page_numberheader
defaultserif10.5 pt1.75 24 / 20 / 22 / 20nonenone
reportserif11 pt1.85 24 / 20 / 22 / 20page/totalleft {title}, divider
resumesans10 pt1.62 14 / 14 / 16 / 14nonenone

Margins read top / right / bottom / left. The tables below state each field's constraints; every field's default is “inherited from the resolved Template” unless noted.

Top-level fields

FieldTypeDefaultConstraintsDescription
templatestringdefault ≤ 64 chars; must resolve (see above) Which Template the Brand Theme overlays.
titlestringempty trimmed, ≤ 300 chars Document metadata: feeds the PDF title and the {title} placeholder in header/footer. Never injected into the body.
fontenumfrom Template serif · sans · mono Body type family; each key maps to a fixed font stack with CJK coverage. Headings keep their display stack regardless.
font_sizenumberfrom Template 8–16 ptBody font size; headings and code scale with it.
line_heightnumberfrom Template 1.2–2.5Body line height.
page_numberenumfrom Template none · page · page/total Footer page number. Any value other than none counts as footer content and triggers the bottom-margin rule below.

color

FieldTypeDefaultConstraintsDescription
color.inkcolorfrom Template #RRGGBBBody text.
color.mutedcolorfrom Template #RRGGBBSecondary text: header/footer copy and captions.
color.accentcolorfrom Template #RRGGBBLinks and emphasis. The built-ins set it to ink — links are ink with an underline, in keeping with the paper aesthetic.
color.washcolorfrom Template #RRGGBBBackground for tables and code blocks.
color.linecolorfrom Template #RRGGBBHairlines and separators.

header and footer

Two symmetric edge blocks with three text slots each. Header sits above a hairline (when divider is on); footer below. Any non-empty slot — or a divider, or a logo in the header, or a page number in the footer — activates that edge and triggers the margin rule below.

FieldTypeDefaultConstraintsDescription
header.left
header.center
header.right
stringfrom Templatetrimmed, ≤ 120 chars Header text slots; empty slots stay empty. The {title} placeholder is replaced by the document title.
header.dividerbooleanfrom Template— Hairline between header and body.
footer.left
footer.center
footer.right
stringfrom Templatetrimmed, ≤ 120 chars Footer text slots; same placeholder rule as the header.
footer.dividerbooleanfrom Template— Hairline between body and footer.

logo

FieldTypeDefaultConstraintsDescription
logo.urlstringnone https: URL ≤ 2,048 bytes on a public host, or a data:image/* URI ≤ 512 KB Header logo. Fetched and embedded server-side at Render time; an unreachable https logo degrades to a text-only header rather than a broken frame.
logo.heightnumber— 4–24 mm; required when logo.url is set Logo height in millimeters.

margins

FieldTypeDefaultConstraintsDescription
margins.topnumberfrom Template5–40 mm Top margin. With a header: ≥ 10 mm, and ≥ logo height + 2 mm when a logo is set.
margins.rightnumberfrom Template5–40 mm Right margin.
margins.bottomnumberfrom Template5–40 mm Bottom margin. With a footer (content or page number): ≥ 10 mm.
margins.leftnumberfrom Template5–40 mm Left margin.

Cross-field rules