How to create and manage blog posts, documentation, images, and social media data.
Content Management
Blog Posts
File Location
Blog posts are MDX files stored by locale:
- English:
content/blog/en/<slug>.mdx - Chinese:
content/blog/zh-hans/<slug>.mdx
Frontmatter Schema
Every blog post requires frontmatter at the top of the file:
---
title: "Your Post Title"
description: "A brief summary of the post (used in SEO and listings)"
date: 2025-01-15
categories:
- technology
- tutorial
tags:
- nextjs
- cloudflare
author: author-slug
cover: /images/blog/my-post-cover.jpg
contentType: article
draft: false
---| Field | Required | Description |
|---|---|---|
title | Yes | Post title |
description | Yes | Short summary for SEO meta tags and listing cards |
date | Yes | Publication date in YYYY-MM-DD format |
categories | No | Array of category slugs (defined in src/config/categories/) |
tags | No | Array of tag strings for filtering |
author | No | Author slug (defined in src/config/authors.ts) |
cover | No | Path to cover image (relative to public/) |
contentType | No | Content type label (e.g. article, tutorial, guide) |
draft | No | Set to true to hide from listings |
Writing Content
After the frontmatter, write your content in standard MDX. You can use Markdown syntax, JSX components, and code blocks:
---
title: "My First Post"
description: "Getting started with docsblog-app"
date: 2025-01-15
---
# My First Post
This is a paragraph with **bold** and *italic* text.
## Code Example
\`\`\`typescript
const greeting = "Hello, world!";
console.log(greeting);
\`\`\`Documentation
File Location
Documentation pages are MDX files stored by locale:
- English:
content/docs/en/ - Chinese:
content/docs/zh-hans/
Sidebar Navigation
Each documentation directory uses a meta.json file to control the sidebar order and titles:
{
"title": "Section Title",
"pages": [
"index",
"getting-started",
"configuration"
]
}The pages array determines the order of items in the sidebar. Each entry corresponds to an MDX filename (without the .mdx extension).
Nested Sections
Create subdirectories for nested documentation sections. Each subdirectory should contain its own meta.json:
content/docs/en/
├── meta.json
├── index.mdx
├── configuration.mdx
└── admin/
├── meta.json
├── index.mdx
└── blog-management.mdxImages
Place images in the public/ directory and reference them with absolute paths:
Recommended directory structure:
public/
├── images/
│ ├── blog/ # Blog post images
│ ├── authors/ # Author avatars
│ └── items/ # Navigation item icons
└── favicon.icoTwitter / X Data
Twitter account data is stored as JSON files in content/twitters/:
content/twitters/
├── accounts.json
└── ...Each account entry includes fields like handle, display name, description, avatar URL, and category tags. Manage these via the admin panel at /admin/twitter or edit the JSON files directly.
YouTube Data
YouTube channel data is stored as JSON files in content/youtubes/:
content/youtubes/
├── channels.json
└── ...Each channel entry includes fields like channel ID, name, description, thumbnail URL, and category tags. Manage these via the admin panel at /admin/youtube or edit the JSON files directly.