*** title: Customizing slugs within your site description: >- Customize URL paths in your Fern documentation site. Rename slugs for pages, sections, tabs, landing pages, and subheadings, or skip them entirely. ---------------------------------------------------------------------- For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt). By default, Fern generates the slug of a page based on the navigation structure in the `docs.yml` file. ```yaml docs.yml {5, 7} instances: - url: plantstore.docs.buildwithfern.com navigation: - section: Get Started contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/get-started/welcome`. ```yaml docs.yml {5, 13, 15} instances: - url: plantstore.docs.buildwithfern.com tabs: docs: display-name: Docs reference: display-name: API Reference navigation: - tab: docs layout: - section: Get Started contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/docs/get-started/welcome`. You can customize these default slugs by renaming them or skipping them entirely. ## Renaming slugs Set the `slug` property in `docs.yml` or in a page's frontmatter to customize the URL path. ### 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. ```yaml docs.yml {3, 6} navigation: - section: Get Started slug: start contents: - page: Welcome slug: intro path: ./docs/pages/welcome.mdx ``` 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. ```yaml docs.yml {4} tabs: docs: display-name: Docs slug: guides reference: display-name: API Reference navigation: - tab: docs layout: - section: Get Started contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/guides/get-started/welcome`. ### Modify a landing page's slug To modify the slug used for a landing page, you can set the `slug` within the `landing-page` object. ```yaml title="docs.yml" {4} landing-page: page: Page Title path: path/to/landing-page.mdx slug: /welcome ``` ### Override a page's slug with frontmatter Frontmatter slugs take precedence over slugs generated or set in `docs.yml`, giving you full control over a page's URL. ```yaml title="docs.yml" navigation: - section: Get Started slug: start contents: - page: Quickstart path: ./docs/pages/quickstart.mdx ``` With this configuration, the page would normally be at `plantstore.docs.buildwithfern.com/start/quickstart`. To override this, set `slug` in the page's frontmatter: ```markdown title="quickstart.mdx" {2} --- title: Quickstart slug: start-up --- ``` The page is now available at `plantstore.docs.buildwithfern.com/start/start-up` instead. See [frontmatter configuration](/learn/docs/configuration/page-level-settings#slug) for more details. ### 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. ```yaml docs.yml navigation: - section: Get Started contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` ```markdown welcome.mdx ... ## Frequently Asked Questions ... ``` 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: ```markdown welcome.mdx ## Frequently Asked Questions [#faqs] ``` 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`. ```yaml docs.yml {6} instances: - url: plantstore.docs.buildwithfern.com navigation: - section: Get Started skip-slug: true contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/welcome`. ```yaml docs.yml {7, 15} instances: - url: plantstore.docs.buildwithfern.com tabs: docs: display-name: Docs skip-slug: true reference: display-name: API Reference navigation: - tab: docs layout: - section: Get Started skip-slug: true contents: - page: Welcome path: ./docs/pages/welcome.mdx ``` In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/welcome`.