Skip to content

Blog frontmatter

Frontmatter is the small block of metadata at the top of a Markdown post, written in YAML between two --- lines. It holds the title, description, date, and any other fields your site uses. Lyra reads your existing posts to learn your frontmatter fields, then writes every new post to match. If your posts have no frontmatter, add a simple convention before you connect.

What frontmatter looks like

A typical post starts with a frontmatter block, then the body:

---
title: "How we cut our build time in half"
description: "A short, specific summary for search and link previews."
date: "2026-07-24"
tags:
  - engineering
  - performance
---
 
Your post body starts here, in Markdown.

Your static site generator reads these fields to render the page, set the meta tags, and place the post in your blog.

Why Lyra needs frontmatter

Frontmatter is how Lyra writes a post that slots into your site with no reformatting. When she scopes your repo, she learns:

  • Where your posts live, such as content/blog/ or _posts/.
  • Your frontmatter fields, so a description field comes out as a description field, not a guess.
  • Your date format and slug rule, so the filename and dates match your existing posts.

She then writes a new .md file shaped like the ones already there. A post with a description field and a published boolean comes back with the same keys, in the same shape.

Lyra learns your fields, you do not configure them

You do not fill in a frontmatter template in Lyra. She reads the posts already in your repo during scoping and records what she found in your writing guide. If your frontmatter uses excerpt instead of description, or an author block, or custom tags, she matches whatever your posts already use.

This is why it helps to connect a repo that already has at least a few well-formed posts. The more consistent your existing frontmatter, the more precisely Lyra matches it.

Let an AI agent build it for you

You do not have to write the frontmatter schema, the reader, or the routes by hand. We provide a complete build guide you hand to a coding agent like Claude or Codex, and it scaffolds the whole blog, including the exact frontmatter contract Lyra reads. See Build your blog with an AI agent.

If your posts have no frontmatter

If your posts are Markdown but have no frontmatter block, add a small, consistent convention before you connect. You do not need many fields. Start with the ones your site actually renders:

  1. Pick the fields your site needs, usually title, description, and date.
  2. Add the same frontmatter block to the top of each existing post.
  3. Confirm your site builds and renders the posts correctly with the new fields.
  4. Commit the change, then connect the repo so Lyra scopes the updated posts.

Keep the fields consistent across posts. Lyra matches the pattern she sees, so a uniform convention produces uniform new posts.

After you change frontmatter

If you change your frontmatter convention after Lyra has already scoped your repo, re-scope so she learns the new fields. Go to Settings > Repository and click Re-scope. See Connect your repository.

What's next