Writing a post
Drop a .md file into src/lib/posts/. Frontmatter drives everything:
---
title: My Launch Announcement
excerpt: One sentence shown on cards and in meta descriptions.
publishedAt: 2026-01-15
author: Your Name
tags: [product, launch]
featured: true
slug: my-launch-announcement
---
Your markdown content here. slugis optional — it defaults to the filenamefeatured: truesurfaces the post in the Featured section of/blog- Posts with
publishedAtin the future are hidden automatically (schedule by date) tagspower tag chips on listing and detail pages
Components inside posts
Posts compile through mdsvex, so Svelte components work exactly like in the
docs — import them in a script block and use them inline. The template ships
demo components in src/lib/components/MDSvex/ (Count, Boinger, Seriously) showing the pattern.
Rendering pipeline
- Listing:
getAllPosts()reads only frontmatter from every post (cheap) - Detail:
getPostBySlug()loads one compiled component, gated by publish date rehype-slugadds heading anchors; syntax highlighting comes from mdsvex’s shiki integration configured insvelte.config.js
SEO
Each post emits page-specific meta via its load function: title, description,
canonical URL, OpenGraph article type with published time and author.
Docs vs blog
Both run on the same mdsvex engine. The docs add a config registry, TOC
extraction, and pagination — see Writing Docs.