Skip to content
@jordanlee
documentation

Content

Writing content

How to add posts, projects, docs, and standalone pages with typed frontmatter.

on this page

All content lives in src/content/. Each folder is a collection with a schema in src/content.config.ts; a typo in frontmatter fails the build with a clear message instead of silently rendering wrong.

Posts

Create src/content/posts/my-post.md (or .mdx). Sub-folders are allowed — the file path becomes the URL, so posts/series-name/day-1.md is served at /posts/series-name/day-1.

src/content/posts/my-post.md
---
title: 'My post'
description: 'One or two sentences for the list, RSS, and social cards.'
date: 2026-07-20
updated: 2026-07-25 # optional
tags: ['photography', 'field-notes']
series: 'Field notes from Lisbon' # optional — enables "See also in"
image: '/images/posts/cover.jpg' # optional — cover + Open Graph image
externalLink: 'https://…' # optional — link the title elsewhere
draft: false
---
Your content here.
  • series groups posts: every post with the same series name gets a numbered “See also in” block, in reading order.
  • externalLink turns the post into a link-out (no page is generated) — handy for pieces published elsewhere.
  • Drafts render in npm run dev but are skipped by npm run build.

Images with captions

An image on its own line with alt text becomes a <figure> with a caption:

![The caption goes here](/images/posts/photo.jpg)

Links to other sites automatically open in a new tab with rel="noopener noreferrer".

Projects

src/content/projects/alto-coffee.md
---
title: 'Alto Coffee'
description: 'What it is, in one sentence.'
image: '/images/projects/alto-coffee.jpg' # or .png / .gif / .webm / .mp4
skills: ['Branding', 'Packaging']
link: 'https://…' # "View project" button
sourceCode: 'https://github.com/…' # optional "Source code" button
kicker: 'Project' # small label above the title
order: 1
featured: true
---

A project with no body is a card that links out. A project with body content also gets its own page at /projects/<id>, and the card links to it. link may be an internal path such as /tags/my-series if the “project” is a series of posts.

Docs

src/content/docs/guides/my-guide.md
---
title: 'My guide'
description: 'Shown in the docs index and as the page subtitle.'
group: 'Guides' # sidebar heading
order: 10 # position within the group
---

Groups appear in the order their first page is encountered (by order), so give your “Getting Started” pages the lowest numbers.

Pages

Any file in src/content/pages/ becomes a top-level route: about.md → /about, uses.md → /uses.

src/content/pages/about.md
---
title: 'About'
description: 'Optional subtitle.'
noindex: false
---

MDX components

In .mdx files the <Callout> and <Tabs> components are available without imports — see Component reference.