Blog

The blog system is built using Markdown files and TanStack Router.

content

Blog posts are stored in src/content/blog/ as Markdown files with frontmatter.

Example Post

---
id: 1
slug: "my-first-post"
title: "My First Post"
excerpt: "This is an excerpt."
category: "General"
author:
  name: "John Doe"
  avatar: "https://example.com/avatar.jpg"
  role: "Author"
date: "Mar 15, 2024"
readTime: "5 min read"
image: "https://example.com/cover.jpg"
---

# Hello World

This is the content of the blog post.

Loader

The blog data is loaded using a utility in src/lib/blog-data.ts. This utility reads all markdown files in the directory and parses the frontmatter.

Routing

  • /blog: Lists all blog posts.
  • /blog/$slug: Renders a specific blog post.