Page slugs
URL structure and page tree organization
Page slugs determine the URL structure of your documentation.
File-based routing
fromsrc uses file-based routing. The file path becomes the URL:
| file | url |
|---|---|
docs/index.mdx | /docs |
docs/installation.mdx | /docs/installation |
docs/components/callout.mdx | /docs/components/callout |
docs/getting-started/index.mdx | /docs/getting-started |
Meta files
Use _meta.json files to control page ordering and titles in the sidebar.
Example
Fields
| field | type | description |
|---|---|---|
| title | string | display title for the folder |
| icon | string | lucide icon name |
| pages | string[] | ordered list of page slugs |
Ordering
Without a meta file, pages are sorted by their order frontmatter field:
With a meta file, the pages array determines the order. Pages not listed appear at the end alphabetically.
Nested folders
Each folder can have its own _meta.json:
Folder pages
Folders with an index.mdx become clickable links:
Without an index, the folder is just a grouping container in the sidebar.