Skip to content

Commit db43278

Browse files
authored
chore: landing page slug configuration options (#350)
1 parent a5292a8 commit db43278

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

fern/products/docs/pages/customization/what-is-docs-yml.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ The GitHub repository must be **public** for the "Edit this page" feature to wor
504504
landing-page:
505505
page: Page Title
506506
path: path/to/landing-page.mdx
507+
slug: /welcome
507508
```
508509

509510
<ParamField path="page" type="string" required={true}>
@@ -514,6 +515,12 @@ landing-page:
514515
Relative filepath to the desired landing page Markdown file.
515516
</ParamField>
516517

518+
<ParamField path="slug" type="string" required={false}>
519+
The slug of the landing page. Defaults to the page name.
520+
521+
The slug can also be overridden in the frontmatter of the landing page Markdown file.
522+
</ParamField>
523+
517524
See [Vapi's landing page live](https://docs.vapi.ai/) and the associated [Markdown file](https://github.com/VapiAI/docs/blob/main/fern/quickstart/introduction.mdx?plain=1).
518525

519526
## Metadata configuration

fern/products/docs/pages/seo/configuring-slugs.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ navigation:
8383

8484
In the example above, the **Welcome** page would be hosted at `plantstore.docs.buildwithfern.com/guides/get-started/welcome`.
8585

86+
#### Modify a landing page's slug
87+
To modify the slug used for a tab, you can set the `slug` within the `landing-page` object.
88+
89+
```yaml title="docs.yml" {4}
90+
landing-page:
91+
page: Page Title
92+
path: path/to/landing-page.mdx
93+
slug: /welcome
94+
```
95+
8696
#### Override a page's slug
8797
You can set the exact slug of a page within its frontmatter. [You can read more about the frontmatter configuration here](/learn/docs/content/frontmatter#slug).
8898

0 commit comments

Comments
 (0)