Guide: Content Organization
Best practices for organizing and structuring your MarkoPress content
# Guide: Content Organization
Learn how to effectively organize and structure your MarkoPress content for scalability, maintainability, and optimal user experience.
# Overview
Proper content organization is crucial for:
- π Easy navigation and discovery
- π Scalable site structure
- π₯ Collaboration-friendly workflows
- π Consistent user experience
- π Better SEO performance
# Directory Structure
# Default Structure
your-site/
βββ .markopress/
β βββ theme/ # Theme overrides
βββ content/
β βββ pages/ # General pages β /route
β βββ docs/ # Documentation β /guides/route
β βββ blog/ # Blog posts β /blog/route
βββ public/ # Static assets
βββ src/
β βββ routes/ # Custom routes
β βββ tags/ # Custom components
βββ markopress.config.ts # Site configuration
# Content Types
Each directory serves a specific purpose:
content/pages/ - General pages (About, Contact, Home) content/guides/ - Documentation (Guides, API Reference, Tutorials) content/blog/ - Blog posts (News, Tutorials, Updates)
# Naming Conventions
# Files
Use kebab-case for filenames:
β
good-file-name.md
β Bad File Name.md
β bad_file_name.md
β badFileName.md
# Dates for Blog Posts
Use YYYY-MM-DD prefix for blog posts:
content/blog/
βββ 2024-01-15-first-post.md
βββ 2024-01-20-second-post.md
βββ 2024-02-03-third-post.md
# Index Files
Use index.md for directory roots:
content/guides/
βββ index.md # β /docs
βββ guide/
β βββ index.md # β /guides/guide
# Content Type Guidelines
# Pages
Purpose: General site pages (About, Contact, Pricing)
Location: content/pages/
URL Pattern: /{filename}
Example:
content/pages/
βββ index.md # β /
βββ about.md # β /about
βββ contact.md # β /contact
βββ pricing.md # β /pricing
Best Practices:
- Keep pages focused on single topics
- Use descriptive filenames
- Include SEO metadata
- Keep content under 1500 words if possible
# Documentation
Purpose: Guides, API docs, tutorials
Location: content/guides/
URL Pattern: /guides/{path}
Example:
content/guides/
βββ index.md # β /docs
βββ getting-started.md # β /guides/getting-started
βββ installation.md # β /guides/installation
βββ configuration.md # β /guides/configuration
βββ api/
β βββ index.md # β /guides/api
β βββ routing.md # β /guides/api/routing
β βββ markdown.md # β /guides/api/markdown
βββ guides/
βββ theming.md # β /guides/guides/theming
βββ plugins.md # β /guides/guides/plugins
Organization Patterns:
By User Journey:
content/guides/
βββ getting-started/
βββ basic-concepts/
βββ advanced-features/
βββ reference/
By Feature:
content/guides/
βββ installation/
βββ configuration/
βββ components/
βββ deployment/
By Audience:
content/guides/
βββ users/
βββ developers/
βββ administrators/
Best Practices:
- Use
orderfrontmatter for sidebar ordering - Group related docs in subdirectories
- Create index pages for each section
- Cross-reference related content
# Blog Posts
Purpose: News, tutorials, thoughts
Location: content/blog/
URL Pattern: /blog/{filename-without-date}
Example:
content/blog/
βββ 2024-01-15-announcement.md # β /blog/announcement
βββ 2024-01-20-tutorial-part1.md # β /blog/tutorial-part1
βββ 2024-01-27-tutorial-part2.md # β /blog/tutorial-part2
βββ 2024-02-03-case-study.md # β /blog/case-study
Best Practices:
- Use date prefix for chronological ordering
- Include date, author, tags in frontmatter
- Keep posts under 2000 words
- Use categories for broad grouping
- Use tags for specific topics
# Frontmatter Strategy
# Required Fields
All content should have:
---
title: "Page Title"
description: "Page description for SEO"
---
# Blog Posts
---
title: "Post Title"
description: "Post description"
date: 2024-01-15
author: "Author Name"
tags: ["tag1", "tag2"]
categories: ["Category"]
excerpt: "Brief summary"
---
# Documentation
---
title: "Page Title"
description: "Page description"
order: 1 # For sidebar ordering
prev: /guides/previous-page # Previous page link
next: /guides/next-page # Next page link
---
# Navigation Structure
# Top-Level Navigation
Keep nav items to 5-7 maximum:
navbar: [
{ text: 'Home', link: '/' },
{ text: 'Docs', link: '/docs' },
{ text: 'Blog', link: '/blog' },
{ text: 'About', link: '/about' },
{ text: 'Contact', link: '/contact' },
]
# Sidebar Structure
Organize docs into logical groups:
sidebar: {
'/guides/': [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/guides/intro' },
{ text: 'Installation', link: '/guides/install' },
{ text: 'Quick Start', link: '/guides/quick-start' },
],
},
{
text: 'Core Concepts',
collapsed: true, // Collapsed by default
items: [
{ text: 'Architecture', link: '/guides/architecture' },
{ text: 'Routing', link: '/guides/routing' },
{ text: 'Rendering', link: '/guides/rendering' },
],
},
],
}
# Content Length Guidelines
# Pages
| Type | Recommended Length |
|---|---|
| Homepage | 300-500 words |
| About | 500-800 words |
| Pricing | 400-600 words |
| Contact | 200-400 words |
# Documentation
| Type | Recommended Length |
|---|---|
| Overview | 500-800 words |
| Tutorial | 1000-2000 words |
| API Reference | 300-600 words per endpoint |
| Guide | 800-1500 words |
# Blog Posts
| Type | Recommended Length |
|---|---|
| News/Updates | 300-600 words |
| Tutorials | 1000-2000 words |
| Case Studies | 1200-2500 words |
| Opinion/Thoughts | 800-1500 words |
# Taxonomy Strategy
# Categories
Use categories for broad groupings (3-5 maximum):
categories: ["Tutorials"] # Good
categories: ["Web Development"] # Good
categories: ["post"] # Too generic
Recommended Categories:
- Tutorials
- News/Updates
- Case Studies
- Best Practices
- Release Notes
# Tags
Use tags for specific topics (unlimited):
tags: ["performance", "optimization", "vite"]
Tag Strategy:
- Use consistent tag names
- Prefer kebab-case:
web-development - Avoid singular/plural duplicates
- Use descriptive tags:
performancenotperf
# Cross-References
# Internal Links
Link to related content:
See [Installation](/guides/installation) for setup instructions.
Learn more in the [Theming Guide](/guides/theming).
# Related Content Sections
Add related content at the end:
## Related Content
- [Getting Started](/guides/getting-started)
- [Configuration](/guides/configuration)
- [Deployment](/guides/deployment)
# See Also Blocks
> **See Also**
>
> - [API Reference](/guides/api)
> - [Examples](/guides/examples)
# Media Organization
# Images
Organize images by content type:
public/
βββ images/
β βββ blog/
β β βββ 2024-01-15-post/
β β βββ 2024-01-20-post/
β βββ docs/
β β βββ installation.png
β β βββ configuration.jpg
β βββ general/
β βββ logo.png
β βββ hero.jpg
# File Naming
Use descriptive names:
β
blog-post-hero-image.jpg
β
installation-step1-screenshot.png
β IMG_1234.jpg
οΏ½ Untitled.png
# Content Migration
# From Other Platforms
VitePress:
# Copy docs
cp -r docs/* content/guides/
# Copy blog
cp -r blog/* content/blog/
Docusaurus:
# Copy docs
cp -r docs/* content/guides/
# Copy blog (from blog/ to content/blog/)
cp -r blog/* content/blog/
# Copy static assets
cp -r static/* public/
# Scalability Patterns
# Large Documentation Sites
Structure:
content/guides/
βββ index.md
βββ getting-started/
β βββ index.md
β βββ installation.md
β βββ configuration.md
βββ concepts/
β βββ index.md
β βββ architecture.md
β βββ data-flow.md
βββ guides/
β βββ index.md
β βββ basic-usage.md
β βββ advanced-features.md
βββ api/
β βββ index.md
β βββ routes.md
β βββ components.md
βββ reference/
β βββ index.md
β βββ config.md
β βββ cli.md
βββ resources/
βββ index.md
βββ examples.md
βββ faq.md
Configuration:
sidebar: {
'/guides/': [
{ text: 'Getting Started', link: '/guides/getting-started' },
{ text: 'Concepts', link: '/guides/concepts' },
{ text: 'Guides', link: '/guides/guides' },
{ text: 'API', link: '/guides/api' },
{ text: 'Reference', link: '/guides/reference' },
{ text: 'Resources', link: '/guides/resources' },
],
}
# Multi-Author Blogs
content/
βββ authors/
β βββ jane.md
β βββ john.md
β βββ team.md
βββ blog/
βββ 2024-01-15-post-by-jane.md # author: "jane"
βββ 2024-01-20-post-by-john.md # author: "john"
content/authors/jane.md:
---
name: "Jane Developer"
bio: "Full-stack developer"
avatar: "/authors/jane.jpg"
twitter: "@janedev"
website: "https://jane.dev"
---
# Maintenance
# Content Audits
Perform regular content audits:
Quarterly:
- Review outdated content
- Update broken links
- Refresh old screenshots
- Add missing metadata
Annually:
- Reorganize structure if needed
- Archive old content
- Update style guide
- Review analytics
# Content Lifecycle
---
title: "Post Title"
status: "published" # published, archived, draft
lastReviewed: 2024-01-15
nextReview: 2024-07-15
---
# Versioning
# API Documentation
Version your API docs:
content/guides/
βββ api/
β βββ v1/
β β βββ endpoints.md
β β βββ schemas.md
β βββ v2/
β β βββ endpoints.md
β β βββ schemas.md
β βββ index.md
# Best Practices Summary
# β Do
- Use kebab-case for filenames
- Include descriptive frontmatter
- Organize by content type
- Create index pages for sections
- Cross-reference related content
- Keep URLs short and meaningful
- Use consistent terminology
- Regular content audits
# β Donβt
- Use spaces in filenames
- Bury important content deep in structure
- Create orphan pages (no links to them)
- Use duplicate content across pages
- Ignore SEO metadata
- Mix content types in same directory
- Use cryptic file names
- Over-categorize
# Examples
# Small Site Structure
content/
βββ pages/
β βββ index.md
β βββ about.md
β βββ contact.md
βββ blog/
βββ 2024-01-15-first-post.md
βββ 2024-01-20-second-post.md
# Medium Site Structure
content/
βββ pages/
β βββ index.md
β βββ about.md
β βββ pricing.md
β βββ contact.md
βββ docs/
β βββ index.md
β βββ getting-started.md
β βββ configuration.md
β βββ theming.md
β βββ deployment.md
βββ blog/
βββ 2024-01-15-news.md
βββ 2024-01-20-tutorial.md
βββ 2024-01-25-case-study.md
# Large Site Structure
content/
βββ pages/
β βββ index.md
β βββ about.md
β βββ pricing.md
β βββ contact.md
β βββ team.md
βββ docs/
β βββ getting-started/
β βββ concepts/
β βββ guides/
β βββ api/
β βββ reference/
β βββ resources/
βββ blog/
βββ 2024/
β βββ 01/
β β βββ 15-news.md
β β βββ 20-tutorial.md
β β βββ 25-case-study.md
β βββ 02/
β βββ 01-update.md
βββ authors/
βββ team.md
# Tools
# Content Validation
Validate frontmatter:
// plugins/validate-frontmatter.ts
export default function validateFrontmatter() {
return {
name: 'validate-frontmatter',
contentLoaded(ctx) {
const pages = ctx.getPages();
for (const page of pages) {
if (!page.frontmatter.title) {
ctx.utils.warn(`Missing title: ${page.filePath}`);
}
if (!page.frontmatter.description) {
ctx.utils.warn(`Missing description: ${page.filePath}`);
}
}
},
};
}
# Next Steps
- π¨ Learn about Theming
- π Build Plugins
- π Read API Reference