Markdown

Write content in Markdown with YAML frontmatter and GitHub Flavored Markdown support.

Content directory

Markdown files live in the content/ directory of your project. Each .md file is processed during build and rendered as an HTML page.

YAML frontmatter

Every markdown file must begin with YAML frontmatter delimited by ---. The layout field is required:

---
layout: layouts/post
title: "My First Post"
date: "2026-03-28"
description: "A brief introduction."
---

# My First Post

Your markdown content goes here.

Frontmatter as template variables

All frontmatter fields become template variables accessible in the layout. For example, if your frontmatter contains:

---
layout: layouts/post
title: "Hello World"
author: "Jane"
---

Then in your layout template you can use:

<h1>{{ title }}</h1>
<span>By {{ author }}</span>

The markdown body itself is available as the content section via @yield('content') in the layout.

How it works

When tulip builds a markdown file, it:

  1. Parses the YAML frontmatter between the --- delimiters
  2. Converts the markdown body to HTML
  3. Wraps the HTML in the specified layout using @extends and @section('content')
  4. Makes all frontmatter fields available as template variables

GFM support

tulip uses comrak for markdown rendering, which supports GitHub Flavored Markdown extensions:

  • Tables — pipe-delimited table syntax
  • Strikethrough~~text~~
  • Autolinks — URLs are automatically linked
  • Task lists- [x] done and - [ ] todo
  • Fenced code blocks — triple backtick blocks with language hints

Output location

Markdown files from content/ are output to the root of the build directory:

  • content/hello-world.mddist/hello-world/index.html
  • content/blog/post.mddist/post/index.html