DocsBlogDocsBlog
Log in

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
---
FieldRequiredDescription
titleYesPost title
descriptionYesShort summary for SEO meta tags and listing cards
dateYesPublication date in YYYY-MM-DD format
categoriesNoArray of category slugs (defined in src/config/categories/)
tagsNoArray of tag strings for filtering
authorNoAuthor slug (defined in src/config/authors.ts)
coverNoPath to cover image (relative to public/)
contentTypeNoContent type label (e.g. article, tutorial, guide)
draftNoSet 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/

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.mdx

Images

Place images in the public/ directory and reference them with absolute paths:

![Alt text](/images/blog/my-image.png)

Recommended directory structure:

public/
├── images/
│   ├── blog/        # Blog post images
│   ├── authors/     # Author avatars
│   └── items/       # Navigation item icons
└── favicon.ico

Twitter / 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.