MDX Content¶
Write content using MDX (Markdown + JSX components).
Structure¶
Frontmatter¶
---
title: "Post Title"
date: "2024-12-21"
summary: "Brief description"
image: "https://unsplash.com/photos/..."
pinned: false
---
Fields:
title- Post title (required)date- Publication date (required)summary- Short description (required)image/image_url- Hero image (optional, Unsplash URL or local path)pinned- Pin to top of list (optional)
Parsing Pipeline¶
Content is parsed in src/lib/content/mdx.ts using:
gray-matter- Frontmatter extraction with YAML enginereading-time- Estimated read time- Custom slug generation from filename
Custom Components¶
Available in MDX:
Table- Enhanced tables with column definitionsYouTubeEmbed- Responsive YouTube embeds
Creating Content¶
- Create
.mdxfile incontent/notes/ - Add frontmatter with required fields
- Write content with Markdown
- Run dev server to preview