Frontmatter

YAML frontmatter reference for markdown content files.

Overview

Every markdown file in content/ must start with a YAML frontmatter block delimited by ---. Frontmatter defines metadata about the page and controls how it is rendered.

Required fields

FieldDescription
layoutPath to the template layout file (without extension). This layout wraps the rendered markdown content.

Common fields

FieldTypeDescription
titleStringPage title, often used in <title> and headings.
dateStringPublication date, typically in YYYY-MM-DD format.
descriptionStringShort description, useful for meta tags and listing pages.

You can add any custom fields you need. All fields become template variables.

Accessing in templates

Frontmatter fields are available as variables in the layout template:

<title>{{ title }}</title>
<meta name="description" content="{{ description }}">
<h1>{{ title }}</h1>
<time>{{ date }}</time>

Full example

A complete markdown file with frontmatter:

---
layout: layouts/post
title: "Building a Static Site"
date: "2026-03-28"
description: "A step-by-step guide to building your first tulip site."
author: "Jane Doe"
tags: "tutorial, beginner"
---

# Building a Static Site

Welcome to this tutorial. We'll walk through creating
a site from scratch with tulip.

In the layout template layouts/post.tulip, every field is accessible:

<article>
  <h1>{{ title }}</h1>
  <p class="meta">By {{ author }} on {{ date }}</p>
  @yield('content')
</article>