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 order frontmatter 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
---

# 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' },
]

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

TypeRecommended Length
Homepage300-500 words
About500-800 words
Pricing400-600 words
Contact200-400 words

# Documentation

TypeRecommended Length
Overview500-800 words
Tutorial1000-2000 words
API Reference300-600 words per endpoint
Guide800-1500 words

# Blog Posts

TypeRecommended Length
News/Updates300-600 words
Tutorials1000-2000 words
Case Studies1200-2500 words
Opinion/Thoughts800-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: performance not perf

# Cross-References

Link to related content:

See [Installation](/guides/installation) for setup instructions.

Learn more in the [Theming Guide](/guides/theming).

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