Navigation
Organize sidebar pages, link to other resources, and publish multiple versions of your docs.
Overview
Fumadocs UI provides different layouts to display content, you can specify navigation configurations via layouts.
Layout Links
Display navigation links in your layouts.
It is useful for linking to frequently used resources like showcase and pricing pages.
Sidebar Items
Sidebar renders links to all documentation pages.
Under the hood, Page Tree is used to represent the navigation structure.
Versioning
Keep multiple versions available when readers need documentation for older releases. Choose whether versions share a site or have separate deployments:
| Approach | When |
|---|---|
| Root Type | Versioning applies to part of your docs, versions live in the same site |
| Full Versioning | Versioning the entire website, one deployment per version |
Root Type
Create a folder for each version, and mark them as root folders of the same type in meta.json:
{
"title": "1.0.0",
"root": "version"
}The sidebar only shows the content of the opened version, and docs layouts render a dropdown to switch between them, labelled by their title.
Switching keeps your place, it navigates to the same page in the other version, or its index page when the page doesn't exist there:
| Page | Switching to 2.0.0 |
|---|---|
/docs/v1/getting-started | /docs/v2/getting-started |
/docs/v1/legacy-api | /docs/v2, the index page |
Good to Know
The type name ("version") can be anything, it only identifies the type: root folders of the same
type under the same parent are interchangeable.
Full Versioning
Sometimes you want to version the entire website, such as https://v14.fumadocs.dev (Fumadocs v14) and https://fumadocs.dev (Latest Fumadocs).
You can create a Git branch for a version of docs (call it v2 for example), and deploy it as a separate app on another subdomain like v2.my-site.com.
Optionally, you can link to the other versions from your docs. This design allows some advantages over partial versioning:
- Easy maintenance: Old docs/branches won't be affected when you iterate or upgrade dependencies.
- Better consistency: Not just the docs itself, your landing page (and other pages) will also be versioned.
How is this guide?
Last updated on
