Add Doc Page
Learn how to create a new documentation page in Plainform
Learn how to create a new documentation page in your Plainform application.
Goal
By the end of this recipe, you'll have created a new documentation page with proper metadata and navigation.
Prerequisites
- A working Plainform installation
- Basic knowledge of Markdown/MDX syntax
Steps
Create MDX File
Create a new .mdx file in the appropriate section:
# Example locations
content/docs/core/new-topic.mdx
content/docs/core/authentication/new-feature.mdxUse lowercase letters and hyphens for filenames. The filename becomes the URL slug.
Add Frontmatter
Add frontmatter at the top of your file:
---
title: Your Page Title
description: A brief description of the page content
icon: BookOpen
---
# Your Page Title
Your content here...Browse available icons at lucide.dev.
Add to Navigation
Update the meta.json file in the same directory:
{
"title": "Core Documentation",
"pages": [
"introduction",
"new-topic"
]
}The page slug in meta.json must match the filename without the .mdx extension.
Preview and Publish
Start your dev server and navigate to your page:
npm run devThen commit and push:
git add content/docs/
git commit -m "docs: add new documentation page"
git push origin mainCommon Issues
Page Not Appearing
- Verify the page is listed in
meta.json - Check that the slug matches the filename exactly
- Ensure
meta.jsonis valid JSON (no trailing commas)
404 Error
- Confirm the file is in the correct directory
- Check that the file has
.mdxextension - Verify frontmatter is properly formatted with
---markers
Next Steps
- Create Doc Section - Organize pages into sections
- Customize Theme - Customize the docs appearance
Related Documentation
- Fumadocs MDX - Available MDX components
- Fumadocs Page Configuration - Page configuration options
How is this guide ?
Last updated on