Markdown Support
A .md file is a page, just like an .ets file. Markdown is always on.
How it works
- Tags first: the file runs through EJS, so the same tags as ETS work in Markdown. Markdown is content, and its tags are a small escape hatch: plain JavaScript inside, with no TypeScript stripping.
- Then Markdown: the result is rendered as Markdown: CommonMark plus GFM tables, strikethrough, task lists and autolinks.
Front matter
YAML between --- lines at the top of the file is front matter. Each top-level key is passed to ctx.meta(key, value):
---
title: My Blog Post
description: A detailed guide about something interesting
---
# Content starts here...
Read the values in a layout with meta:
<title><%= meta('title') %></title>
<meta name="description" content="<%= meta('description') %>">
Headings
Headings get ids, so you can link to them: the text is lowercased, characters other than a-z, 0-9, -, _ and space are removed, and spaces become -. ## Front matter gets id="front-matter".
Images
Relative image paths go through ctx.asset, so they get fingerprinted URLs:

Markdown partials
A .md file in a _private/ folder can be included from an .ets template with include(). It's rendered the same way, tags then Markdown:
<%- include('intro') %>
Notes
- Layouts are
+layout.ets(or+layout.tsx, see TSX). A layout can't be Markdown:+layout.mdis an error at startup. A Markdown page is still wrapped by the layouts above it.
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.