Skip to content

Commit bfe4489

Browse files
Add missing-redirects check mention to redirects and configuring-slugs pages
1 parent 11dfc41 commit bfe4489

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ In the example above, the **Welcome** page would be hosted at `plantstore.docs.b
4747

4848
You can customize these default slugs by renaming them or skipping them entirely.
4949

50+
<Note>
51+
Changing a slug updates the page's URL. Run [`fern check`](/learn/cli-api-reference/commands#check) to detect pages that moved without a [redirect](/learn/docs/seo/redirects#catching-missing-redirects), so existing links don't break.
52+
</Note>
53+
5054
## Renaming slugs
5155

5256
Set the `slug` property in `docs.yml` or in a page's frontmatter to customize the URL path.

fern/products/docs/pages/seo/redirects.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ subtitle: Learn how to configure redirects in Fern Docs. Set up exact path redir
1212
To add external links to your sidebar navigation, see [Navigation](/learn/docs/configuration/navigation#links).
1313
</Tip>
1414

15+
## Catching missing redirects
16+
17+
The `missing-redirects` rule for [`fern check`](/learn/cli-api-reference/commands#check) automatically detects pages that were removed or moved without a redirect. It compares your current docs navigation against the previously published state and warns when a previously published URL would return a 404.
18+
19+
The rule defaults to `warn` severity. To treat missing redirects as errors, configure the rule in `docs.yml`:
20+
21+
```yaml docs.yml
22+
check:
23+
rules:
24+
missing-redirects: error
25+
```
26+
27+
The check requires authentication via `fern login` or the `FERN_TOKEN` environment variable. It is skipped on first publish, when unauthenticated, or when the network is unavailable.
28+
29+
For the full list of `fern check` validation rules, see [Check configuration](/learn/docs/configuration/site-level-settings#check-configuration).
30+
1531
<llms-only>
1632
## Common errors
1733

0 commit comments

Comments
 (0)