Frontmatter

How to write frontmatter for metadata available in DocuBook

Format

markdown
---
title: Frontmatter
description: How to write frontmatter for metadata available in DocuBook
---

your content here...

Metadata

Below is a table of available frontmatter fields for documentation pages:

Field NameTypeRequiredDescription
titlestringYesThe page title, displayed in the header and metadata.
descriptionstringYesA short description of the page, used for SEO and previews.
imagestring (URL)NoPer-page OG image (og:image) for social sharing. Falls back to meta.ogImage in docu.json. See examples below for accepted path formats.
datestringNoPublication date in YYYY-MM-DD format (e.g. 2026-06-10). If omitted, resolves from: git log → filesystem mtime → hidden.

Image path examples

yaml
# Absolute URL — always works, no resolution needed
image: https://example.com/images/og.png

# Root-relative — resolves against meta.baseURL
# e.g. baseURL=https://docs.example.com → https://docs.example.com/assets/og.png
image: /assets/og.png

# Relative to /docs/ — resolves against baseURL + /docs/
# e.g. baseURL=https://docs.example.com → https://docs.example.com/docs/images/card.png
image: ./images/card.png

# ❌ Wrong — bare filename does NOT auto-resolve to docs/assets/images/
# Would resolve to /docs/page-content-1.png, not /docs/assets/images/page-content-1.png
# image: page-content-1.png

# ✅ Correct path for files inside docs/assets/images/
image: ./assets/images/page-content-1.png

Last updated Jul 21, 2026