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:
- Parses the YAML frontmatter between the
---delimiters - Converts the markdown body to HTML
- Wraps the HTML in the specified layout using
@extendsand@section('content') - 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] doneand- [ ] 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.md→dist/hello-world/index.htmlcontent/blog/post.md→dist/post/index.html