Skip to content
v0.6.5

Frontmatter reference

Frontmatter appears at the top of a Markdown or MDX file. General page fields apply to all content. hero and features apply only to each locale's home page.

Unknown fields may be parsed, but they do not affect Canofold behavior and are not automatically published to the AI page index. ai/pages.json keeps only title, description, createdAt, updatedAt, order, group, subgroup, tags, and owner.

General page fields

Most content pages need only a title, description, and ordering metadata:

yaml
---title: API authenticationseoTitle: 'API authentication and request signing | Acme Docs'description: Configure server-side API tokens and request signaturesorder: 20---
table
titlestringFirst heading or emptyPage title, sidebar, and default SEO title
seoTitlestringBuilt from title and the site titleOverride only the browser and search-result title without changing the page title, sidebar, search, or AI data
descriptionstringEmptySEO, search result, and deterministic summary
createdAtISO 8601 dateNonePreserve the content creation time in public page metadata
updatedAtISO 8601 dateKnown Git content commit time; otherwise hiddenPin the footer's last-updated time and publish it in page metadata
groupstringFirst directory nameCompatibility/display override for the top-level section
subgroupstringSecond directory nameCompatibility/display override for the first nested group
ordernumberLastPage, sidebar, and pagination order
collapsedbooleanfalseInitial subgroup state from its index.md
layoutdocument | playgrounddocumentUse the standard document layout or the editable source/preview Playground layout
statuspublished | draftpublishedPreview drafts with dev and validate with check; production builds omit them
sidebarbooleantrueExclude the page from the sidebar without removing its route
searchbooleantrueInclude in search
aibooleantrueInclude in AI outputs
tagsstring[]EmptyPreserve classification metadata in ai/pages.json
ownerstringEmptyPreserve ownership metadata in ai/pages.json
translation.sourceHashsha256:<64 hexadecimal digits>NoneDefault-locale source fingerprint recorded when reviewing a translation; used only by check

Local dev can preview a draft home page, but every version and locale still needs a published home page before release. If its only home has status: draft, both check and the production build fail.

Directory index.md files are authoritative for group labels and collapsed state. Conflicting group or subgroup labels in one directory fail the build.

group and subgroup do not limit the content tree to two levels. Use directory index.md files for recursive navigation. Keep these fields for legacy content or display-name overrides.

Date fields

Set updatedAt when you need an explicit update date. Use YYYY-MM-DD, or include Z or an offset such as +08:00 when a time is present. Without it, Canofold uses the file's latest content commit from complete Git history. Uncommitted files, shallow clones, or unavailable Git history have no displayed last-updated date; checkout time and shallow-boundary commits are never presented as content history. For Git-derived dates in CI, fetch the complete history (for example, fetch-depth: 0 with GitHub Actions actions/checkout) or set updatedAt explicitly.

Translation review fingerprint

After reviewing a translation against its default-locale source, run canofold check --json and copy the target page's sourceHash from translationStatus into its translation.sourceHash frontmatter field. A subsequent source title, description, or body change makes check report that translation as stale. An unstamped translation or a missing source has unknown status; file timestamps are not used to guess freshness. Review the translation again before replacing the hash rather than copying it only to silence a warning.

Home-page fields

Configure each locale home page in the index.md at that locale's content root. The default locale uses docs/index.md; other locales use docs/{locale}/index.md. canofold.config.ts holds site-wide configuration, not home-page copy.

yaml
---title: Acme DocsseoTitle: 'Acme Docs | Deployable documentation from API definitions'hero:  accent: Build deployable documentation from API definitions  tagline: Keep content and configuration in the repository, then deploy the static build.  image: /banner.png  imageAlt: Acme documentation build flow  actions:    - text: Get started      link: /guide/getting-started/      primary: true      icon: rocketfeatures:  - image: /feature/api.png    title: API reference    details: Build searchable reference pages from versioned content.---

Page structure

table
titlestringHero headingThe single visible page heading
seoTitlestringNot rendered directlyOverride only the browser and search-result title; useful when a short brand name needs a product definition
descriptionstringNot rendered directlySEO description and search summary
hero.accentstringBelow the headingOne sentence for the home page's main message
hero.taglinestringBelow the accentOne or two sentences that define the product or its scope
hero.imagestringRight side of the HeroMain visual; omit it for a single-column Hero
hero.imageAltstringNot rendered directlyAlternative text; use an empty string for a decorative image
hero.actionsarrayHero action rowRendered left to right in array order
featuresarrayBelow the HeroHome-page capability cards

hero.image and actions[].link accept a site path beginning with / or an HTTPS URL. Other protocols fail checks and builds.

Hero actions

table
textstringYesButton label
linkstringYesAbsolute site path or HTTPS URL
primarybooleanNoUse the primary style; a home page may define at most one
iconstringNoUse a built-in Lucide icon from Canofold

Feature cards

table
titlestringYesCard heading
detailsstringYesOne-sentence capability description
imagestringNoUse an image from {docsDir}/public/, such as /feature/api.svg
iconstringNoUse the same built-in icon set as actions

When both image and icon are present, image wins. Omitting both creates a text-only card.

Images and built-in icons

An image path that starts with / maps to {docsDir}/public/. For example, /banner.png maps to {docsDir}/public/banner.png, and /feature/api.svg maps to {docsDir}/public/feature/api.svg.

Actions and feature cards can also use Canofold's built-in Lucide icons without an extra icon package. Accepted values are ai, box, code, file, file-code, gauge, globe, layers, rocket, search, sparkles, and terminal.

Canofold validates home-page fields during content scanning. Invalid types, unknown nested fields, unsupported icons, or multiple primary actions fail checks and builds.