Creating Documentation Pages

Pages in Docunaut are defined as markdown strings in config/pages-content.tsx and configured through config/pages-config.ts.

Step 1: Add Content

Edit config/pages-content.tsx and add your page:

typescript
export const pagesContent: Record<string, string> = { "my-page": `## My New Page Write your markdown content here. ### Section 1 Content for section 1. ### Section 2 More content with **bold** and *italic* text. `, }

Step 2: Register the Slug

Add the page to config/pages-config.ts:

typescript
export const pagesList = [ { slug: "my-page", title: "My New Page" }, ]

Step 3: Add to Navigation

Update config/site.ts to add the page to your navigation:

typescript
navigation: [ { title: "Example Category", icon: "lucide:compass", //Any icon from iconify.design items: [ { title: "Example Title", href: "/docs/guides/example-slug", icon: "lucide:settings" }, //Any icon from iconify.design ], }, ]

Organizing Pages

Use forward slashes for nested pages:

typescript
"docs/guides/my-guide": `## My Guide Content...`

Then link to it with /docs/guides/my-guide.

Best Practices

  • Start each page with an H1 (#) or H2 (##) heading
  • Use descriptive page titles and slugs
  • Add descriptions for better search results
  • Link related pages together
  • Keep slugs lowercase with hyphens
  • Organize pages logically with categories
Built with v0