Skip to main content

Overview

Blog content is managed using Fumadocs and stored in web/next/content/blog/.

Content Structure

  • Location: web/next/content/blog/
  • Format: MDX files with frontmatter
  • Configuration: Defined in web/next/source.config.ts
  • Navigation: Managed in web/next/content/blog/meta.json

Creating a Blog Post

1
Create MDX file
2
Create a new .mdx file in web/next/content/blog/:
3
---
title: My New Post
description: A brief description of my post.
---

## Introduction

Your blog content goes here...
4
Add frontmatter
5
Include title and description in the frontmatter:
6
  • title: The post title (required)
  • description: A brief summary (required)
  • 7
    Write content
    8
    Write your content using MDX syntax. You can use:
    9
  • Markdown formatting
  • React components
  • Code blocks with syntax highlighting
  • Images and media
  • 10
    Add to navigation
    11
    Add an entry to web/next/content/blog/meta.json:
    12
    {
      "pages": [
        "index",
        "getting-started-zero-starter",
        "type-safe-apis-hono-rpc",
        "my-new-post"
      ]
    }
    
    13
    The sequence matters - it determines the order pages appear in navigation.

    Configuration

    Blog source is configured in web/next/source.config.ts:
    web/next/source.config.ts
    import { defineConfig, defineDocs } from "fumadocs-mdx/config"
    
    export const blog = defineDocs({
      dir: "content/blog",
      docs: {
        postprocess: {
          includeProcessedMarkdown: true,
        },
      },
    })
    
    export default defineConfig()
    

    Key Configuration Options

    • dir: Directory containing blog content (content/blog)
    • includeProcessedMarkdown: Enables processed markdown for llms.txt endpoint
    Pages are listed in web/next/content/blog/meta.json:
    web/next/content/blog/meta.json
    {
      "pages": [
        "index",
        "getting-started-zero-starter",
        "type-safe-apis-hono-rpc",
        "monorepo-architecture-saas",
        "authentication-better-auth"
      ]
    }
    
    The sequence matters! Pages appear in the navigation in the order specified in this array.

    MDX Features

    Code Blocks

    import { useState } from "react"
    
    export function Counter() {
      const [count, setCount] = useState(0)
      return <button onClick={() => setCount(count + 1)}>Count: {count}</button>
    }
    

    Images

    ![Alt text](https://example.com/image.png)
    

    Components

    You can import and use React components in your MDX:
    import { CustomComponent } from "@/components/custom"
    
    <CustomComponent prop="value" />
    

    Best Practices

    1. Use descriptive file names: my-new-feature.mdx instead of post1.mdx
    2. Write clear descriptions: Help readers understand what the post is about
    3. Keep URLs clean: File names become URL slugs
    4. Update meta.json: Always add new posts to the navigation
    5. Use code blocks: Include syntax highlighting for code examples
    6. Add images: Visual content improves engagement

    Accessing Blog Posts

    Blog posts are accessible at:
    • Web UI: /blog/post-name
    • AI-friendly: /blog/post-name.md (markdown format for LLMs)
    • Index: /blog.md (list of all blog posts)

    Build docs developers (and LLMs) love