Frontmatter Reference
This documentation system takes a minimalist approach: focus on required metadata and let automation handle the rest.
Required Properties
title
- Type:
string - Description: Document title used in navigation and page headers
- Usage: Keep it descriptive and unique
title: "Getting Started Guide"
description
- Type:
string - Description: Short summary for SEO and previews
- Usage: Target 50–160 characters
description: "Learn how to work with the documentation system."
Automatic Features
Several metadata fields are derived automatically:
- Navigation: Previous/next links and categories from the directory structure
- Ordering: Numeric prefixes in file names (
01-,02-, etc.) - Dates and authors: Pulled from Git history
- Sidebar entries: Built from folder and file names
File Organization
Directory Structure
apps/<project-name>/src/content/docs/[version]/[lang]/[category]/[document].mdx
- Categories are detected from folder names
- Ordering comes from numeric prefixes
- Navigation follows file hierarchy
Naming Pattern
01-getting-started.mdx
02-installation.mdx
03-configuration.mdx
Standard Categories
01-guide/– tutorials and onboarding02-components/– UI component documentation03-advanced/– advanced topics04-reference/– detailed reference materials
Example
Recommended frontmatter for most documents:
---
title: "Your Document Title"
description: "Short explanation of what this document covers"
---
Best Practices
Titles
- Be descriptive and keyword-rich
- Keep them concise
- Ensure uniqueness within a section
Descriptions
- Aim for 50–160 characters
- Highlight outcomes (“Learn how to…”)
- Reflect what users will accomplish
File Organization
- Use numeric prefixes for order
- Group related content in the same folder
- Stick to consistent naming conventions
Additional Considerations
Multi-language Support
Keep the same structure and frontmatter across languages:
# Japanese version
---
title: "コンポーネント概要"
description: "利用可能なUIコンポーネントの完全ガイド"
---
# English version
---
title: "Component Overview"
description: "Complete guide to available UI components"
---
Versioning
Use the same structure per version:
---
title: "Basic Usage"
description: "Learn the fundamentals"
---
Special Cases
Some pages may need extra context—use the same minimal fields:
---
title: "Project Landing"
description: "Overview of the project's core features"
---
Comparing Approaches
Legacy (not used)
---
title: "Document"
description: "Description"
order: 3
category: "guide"
categoryOrder: 1
prev:
text: "Previous"
link: "/prev-page"
next:
text: "Next"
link: "/next-page"
author: "Author"
pubDate: 2024-01-01
updatedDate: 2024-01-15
sidebar: true
toc: true
---
Modern Minimal (recommended)
---
title: "Document"
description: "Description"
---
The system now infers the rest:
orderandcategorycome from the filesystemprevandnextlinks are calculated automatically- Author and date information come from Git history
- Sidebar and TOC behavior follows global settings
Migration Guide
When moving from complex frontmatter to the simplified format:
- Keep only
titleanddescription - Use directory structure and prefixes to control order/category
- Remove
order,category,author, and date fields - Test navigation to confirm everything renders correctly
This approach reduces maintenance overhead while preserving essential metadata.