This guide walks through setting up a complete blog with md0 CMS, from repository structure to publishing your first post.
Repository Structure
Recommended Structure
my-blog/
├── content/
│ ├── posts/
│ │ ├── getting-started.md
│ │ ├── second-post.md
│ │ └── markdown-guide.md
│ └── authors/
│ └── jane-doe.md
├── public/
│ └── images/
│ ├── posts/
│ └── authors/
└── src/
└── pages/
Note: md0 CMS currently supports single-folder patterns (e.g.,
content/posts/*.md). Nested folder support for organizing by year/category is coming soon.
Why This Structure?
- Single folder for posts: All posts in one flat folder (required)
- Separate authors: Reusable author profiles
- Images in public: Accessible by static site generator
- Clean separation: Content separate from code
Step-by-Step Setup
Step 1: Connect Repository
- Go to md0.io/cms
- Click "Connect GitHub"
- Authorize md0 CMS
- Select your blog repository
Step 2: Create Blog Posts Collection
-
Go to Collections → Create Collection
-
Fill in basic info:
- Name: Blog Posts
- Path:
content/posts/*.md - Description: Blog articles and tutorials
-
Click Add Field to build your schema:
-
title (Text, Required, Max 100 chars)
- Placeholder: "Post title"
-
slug (Text, Required)
- Pattern:
^[a-z0-9-]+$ - Help: "URL-friendly version of title"
- Pattern:
-
date (Date, Required)
- Default: Today
-
excerpt (Long Text, Required)
- Min: 50 chars, Max: 200 chars
- Placeholder: "Brief summary (50-200 characters)"
-
author (Text, Required)
- Default: "Admin"
-
tags (List of Text)
- Min items: 1, Max items: 5
-
category (Select, Required)
- Options: Tutorial, Guide, News, Case Study, Opinion
-
featured_image (Image)
-
published (Toggle)
- Default: Off
-
seo (Group)
- meta_title (Text, Max 60 chars)
- meta_description (Long Text, Max 160 chars)
-
-
Click Save Collection
Step 3: Create Authors Collection (Optional)
-
Collections → Create Collection
-
Basic info:
- Name: Authors
- Path:
content/authors/*.md - Description: Author profiles
-
Add fields:
- name (Text, Required)
- bio (Long Text, Required)
- avatar (Image)
- social (Group)
- twitter (Text)
- github (Text)
- linkedin (Text)
-
Save Collection
Creating Your First Post
Step 1: Create New Post
- Navigate to "Blog Posts" collection
- Click "New Post"
- Fill in frontmatter fields
Step 2: Fill Frontmatter
---
title: "Getting Started with md0 CMS"
slug: "getting-started-md0-cms"
date: 2024-01-15
excerpt: "Learn how to set up and use md0 CMS for your blog in just a few minutes."
author: "Jane Doe"
tags:
- tutorial
- getting-started
- cms
category: "Tutorial"
featured_image: "/images/posts/getting-started-hero.jpg"
published: true
seo:
meta_title: "Getting Started with md0 CMS - Complete Guide"
meta_description: "Step-by-step guide to setting up md0 CMS for your blog. No API, no setup, just connect and start writing."
---
Step 3: Write Content
Use the visual editor to write your post:
# Introduction
Welcome to md0 CMS! This guide will walk you through...
## Why md0 CMS?
md0 CMS provides a visual interface for managing markdown content...
- No API integration needed
- Direct GitHub sync
- Visual markdown editor
## Getting Started
Here's how to get started...
Step 4: Add Images
- Click Image button
- Upload or select from library
- Add alt text
- Insert into content
Step 5: Preview and Publish
- Toggle preview mode
- Review content
- Set
published: true - Click Save
Your post commits to GitHub and triggers your site rebuild.
Content Workflows
Draft to Published
Workflow 1: Boolean Flag
Use published field:
# Draft
published: false
# Published
published: true
Your SSG filters based on this flag.
Workflow 2: Separate Folders
Create two collections:
-
Draft Posts
- Path:
content/drafts/*.md
- Path:
-
Published Posts
- Path:
content/posts/*.md
- Path:
Move files between folders when ready to publish.
Editorial Calendar
Use frontmatter dates:
---
title: "Future Post"
date: 2024-12-31 # Future date
published: true
---
Your SSG only shows posts where date <= today.
Multi-Author Workflow
Method 1: Author Field
author: "Jane Doe"
Method 2: Author Profiles
author_id: "jane-doe"
Query author profile in your SSG.
Advanced Features
Series and Related Posts
Add these fields to your Blog Posts collection:
-
Edit your Blog Posts collection
-
Click Add Field:
-
series (Text)
- Help: "Series name (e.g., 'React Basics')"
-
series_order (Number)
- Help: "Order in series"
-
related_posts (List of Text)
- Help: "Slugs of related posts"
-
-
Save Collection
Reading Time
Calculate in your SSG or add field:
- reading_time (Number)
- Help: "Estimated reading time in minutes"
Featured Posts
Add fields for featuring posts on homepage:
-
featured (Toggle)
- Default: Off
-
featured_order (Number)
- Help: "Order on homepage"
Social Media
Enhance social sharing with Open Graph fields:
-
og_image (Image)
- Help: "Open Graph image (1200x630)"
-
twitter_card (Select)
- Options: summary, summary_large_image
Example Posts
Tutorial Post
---
title: "How to Build a Blog with Next.js and md0 CMS"
slug: "nextjs-blog-md0-cms"
date: 2024-01-15
excerpt: "Step-by-step tutorial to create a blog with Next.js and manage content with md0 CMS."
author: "Jane Doe"
tags: [nextjs, tutorial, cms]
category: "Tutorial"
featured_image: "/images/posts/nextjs-blog.jpg"
published: true
---
# How to Build a Blog with Next.js and md0 CMS
In this tutorial, we'll create a blog from scratch...
## Prerequisites
- Node.js 18+
- Basic JavaScript knowledge
- GitHub account
## Step 1: Create Next.js App
...
Guide Post
---
title: "Complete Guide to Markdown Syntax"
slug: "markdown-syntax-guide"
date: 2024-01-15
excerpt: "Everything you need to know about markdown formatting, from basics to advanced features."
author: "John Smith"
tags: [markdown, guide, reference]
category: "Guide"
published: true
---
# Complete Guide to Markdown Syntax
This comprehensive guide covers all markdown features...
News Post
---
title: "md0 CMS v2.0 Released"
slug: "md0-cms-v2-released"
date: 2024-01-15
excerpt: "md0 CMS v2.0 brings new features including MDX support, improved editor, and more."
author: "Admin"
tags: [news, release, update]
category: "News"
published: true
---
# md0 CMS v2.0 Released
We're excited to announce md0 CMS v2.0...
## What's New
- MDX support
- Improved editor
- Better performance
Best Practices
Consistent Frontmatter
Always fill required fields:
- Title
- Date
- Excerpt
- Author
- Category
- Tags (at least one)
SEO Optimization
- Write compelling titles (50-60 chars)
- Write meta descriptions (150-160 chars)
- Use descriptive slugs
- Add alt text to images
- Include relevant keywords in tags
Content Quality
- Write clear, concise excerpts
- Use proper heading hierarchy
- Break up long paragraphs
- Add images to break up text
- Use lists for readability
Image Guidelines
- Featured images: 1200x630px
- Content images: 800-1200px wide
- Compress before upload
- Use descriptive filenames
- Always add alt text
Integration Examples
Next.js Blog
See Next.js Integration guide.
Gatsby Blog
See Gatsby Integration guide.
Hugo Blog
See Hugo Integration guide.
Next Steps
- Define Schemas for custom fields
- Markdown Editing to write content
- Media Management for images
- GitHub Sync to understand workflow