Skip to content
Le blog de Pascal Andy - L'homme et les relations technologiques

Frontmatter Schema

Frontmatter Schema

Reference for blog post frontmatter fields.

The schema lives in src/content.config.ts, and it is strict: an unknown key or an unregistered tag fails the build. After editing frontmatter, run just check --only content; a failure names the post, the field, and the fix.

Required Fields

FieldTypeFormatDescription
titlestring—Post title
tagsstring[]—At least 1 tag; each must be a slug in src/tags.ts
date_createddate2026-01-11Publication date
authorstring—Post author, usually Pascal Andy
descriptionstring—SEO meta and post cards (not shown in the body)

Optional Fields

FieldTypeDefaultDescription
featuredboolean—Show on the homepage featured section
draftboolean—Exclude the post from every build, dev included: no page, no listing, no RSS
ogImageimage | string—Custom OG image (local or URL)
canonicalURLstring—The original source of duplicated content, so search engines credit it
hideEditPostboolean—Hide the “Edit post” link
mermaidbooleanfalseEnable Mermaid diagram rendering

Scheduled Posts

A post whose date_created is in the future stays out of the home page, the blog roll, the tag pages, and RSS in production until 15 minutes before that date (SITE.scheduledPostMargin in src/config.ts). Its page is still built at its URL. The dev server lists it right away.

Examples

Minimal (5 required fields)

(in this order by default)

---
title: "My Post Title"
tags:
  - random
date_created: 2025-01-15
author: Pascal Andy
description: "Brief description for SEO and cards"
---

Full (all fields)

---
title: "My Post Title"
tags:
  - technologie
  - dev-notes
date_created: 2025-01-15
author: Pascal Andy
featured: true
draft: false
ogImage: "./custom-og.png"
canonicalURL: "https://original-source.com/post"
hideEditPost: false
mermaid: true
description: "Brief description for SEO and cards"
---

Notes