Frontmatter reference
Every field accepted at the top of an MDX file, by collection.
2 min read
Frontmatter is the YAML block between --- at the top of each .mdx file. It's
read by src/lib/content.ts and drives listings, metadata, feeds and the sitemap.
Common fields
Valid in any collection.
| Field | Type | Required | What it does |
|---|---|---|---|
title | string | yes | Page title, browser tab and social card |
description | string | no | Listing summary, meta description and RSS |
date | ISO string | yes | Sorts listings and fills the publish date |
tags | list | no | Chips rendered in the article footer |
published | boolean | no | false hides it from listings, RSS and sitemap |
Without title or date, the build fails and names the file — on purpose.
projects only
| Field | Type | What it does |
|---|---|---|
stack | list | Technologies, shown as chips on the card and page header |
repo | URL | "Repository" button in the header |
demo | URL | "View live" button in the header |
featured | boolean | Puts the project on the home page, section 04 / work |
order | number | Order in the listing and among featured projects (lower first) |
Projects are the one collection that does not sort by date: a portfolio is curated, so
order decides and the date only breaks ties. Without order, a project sorts last.
---
title: "Project name"
description: "What it solves, in one sentence."
date: "2026-07-20"
stack: ["Next.js", "PostgreSQL", "Docker"]
repo: "https://github.com/Victor-Alves0/example"
demo: "https://example.vercel.app"
featured: true
order: 1
---docs only
| Field | Type | What it does |
|---|---|---|
category | string | Groups the doc in the sidebar. Without it, falls into "General" |
order | number | Order within the category (lower first) |
The category is written in the file's own language: "Guias" under
content/pt/docs/, "Guides" under content/en/docs/.
newsletter only
| Field | Type | What it does |
|---|---|---|
issue | number | Renders "Issue N" above the title |
Notes
Dates use the YYYY-MM-DD format and are formatted in UTC — so the date shown
doesn't shift with the reader's timezone.
Reading time isn't a field: it comes from a word count at 200 words per minute, computed at build time.
The social card is automatic too. Each page generates its own OG image at /og,
using the title and the section name.