Blog and Static Pages
Learn how to use Content Collections for managing blog posts and static MDX content in your directory website.
Dirstarter uses Content Collections for managing blog posts and static MDX content. This system provides a type-safe way to handle markdown content with frontmatter validation and MDX support.
Configuration
The core configuration is defined in content-collections.ts
:
Blog Post Structure
Blog posts are stored in content/posts/
directory as MDX files. Each post requires specific frontmatter fields:
Adding New Content Collections
To add a new content collection for static MDX content:
Define a new collection in content-collections.ts
:
Create corresponding directory structure:
Access the content in your components:
Related Resources
Edit on GitHub
Last updated on