Customizing slugs within your site
By default, Fern generates the slug of a page based on the navigation structure in the docs.yml
file.
Renaming slugs
Modify a page or section slug
To modify the slug used for a page or section, you can set the slug
within the navigation
object.
In the example above, the Welcome page would be hosted at plantstore.docs.buildwithfern.com/start/intro
.
Modify a tab slug
To modify the slug used for a tab, you can set the slug
within the tabs
object.
In the example above, the Welcome page would be hosted at plantstore.docs.buildwithfern.com/guides/get-started/welcome
.
Override a page’s slug
You can set the exact slug of a page within its frontmatter. You can read more about the frontmatter configuration here.
You can set the slug in the frontmatter of ./docs/pages/quick-start.mdx
to start-up
:
The page then becomes available at plantstore.docs.buildwithfern.com/start-up
.
Renaming slugs for subheadings
By default, deep links to subheadings are generated by appending a #
and the subheading title (converted to kebab-casing-convention
) onto the page URl.
The link to this section will be available at plantstore.docs.buildwithfern.com/get-started/welcome#frequently-asked-questions
.
To rename the slug of the subheading, add the desired slug
The link to this section will now be available at plantstore.docs.buildwithfern.com/get-started/welcome#faqs
.
Skipping slugs
To ignore a tab or section when generating the slug, simply indicate skip-slug: true
.