Skip to content

Commit a55b604

Browse files
Add missing-redirects check mention to redirects and slug pages
(#5177) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent 67a82ac commit a55b604

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

fern/products/docs/pages/changelog/2026-04-02.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ agents:
1515
1616
## Missing redirects check rule
1717
18-
The `missing-redirects` rule for `fern check` 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. Configure its severity in `docs.yml`:
18+
The `missing-redirects` rule for `fern check` 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.
19+
20+
```bash title="Example" wordWrap
21+
[warning] Page "products/api-def/openapi/extensions/default.mdx" was removed. The previously published URL "/learn/api-definitions/openapi/extensions/default-values" will return 404 without a redirect. Consider adding a redirect in docs.yml to preserve existing links.
22+
```
23+
24+
Configure its severity in `docs.yml`:
1925

2026
```yaml docs.yml
2127
check:
2228
rules:
2329
missing-redirects: error
2430
```
2531

26-
Requires authentication via `fern login` or the `FERN_TOKEN` environment variable. The check is skipped on first publish, when unauthenticated, or when the network is unavailable.
27-
28-
Requires Fern CLI version `4.57.0` or later.
29-
3032
<Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/configuration/site-level-settings#check-configuration">Read the docs</Button>
3133

3234
## Library docs generator

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/cli-reference/commands#fern-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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ 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+
You can use [`fern check`](/learn/cli-api-reference/cli-reference/commands#fern-check) to automatically detect pages that were removed or moved without a redirect. Configure the [`missing-redirects` rule](/learn/docs/configuration/site-level-settings#check-configuration) in `docs.yml` to control its severity.
18+
1519
<llms-only>
1620
## Common errors
1721

1822
Errors below are surfaced by `fern check` and `fern generate --docs`.
1923

20-
### Page "X" was moved from "/old" to "/new". The old URL will return 404 without a redirect.
24+
### Page "X" was moved from "/old" to "/new". The old URL will return 404 without a redirect. Consider adding a redirect in docs.yml to preserve existing links.
2125

2226
A page's [slug](/learn/docs/seo/configuring-slugs) changed relative to the last [published version](/learn/docs/preview-publish/publishing-your-docs) of your docs. Add a [redirect](/learn/docs/configuration/site-level-settings#redirects-configuration) in `docs.yml` so existing links keep working:
2327

@@ -27,7 +31,7 @@ redirects:
2731
destination: /new
2832
```
2933
30-
### Page "X" was removed. The previously published URL "/old" will return 404 without a redirect.
34+
### Page "X" was removed. The previously published URL "/old" will return 404 without a redirect. Consider adding a redirect in docs.yml to preserve existing links.
3135
3236
A [published page](/learn/docs/preview-publish/publishing-your-docs) no longer exists in the [navigation](/learn/docs/configuration/navigation). Add a [redirect](/learn/docs/configuration/site-level-settings#redirects-configuration) to another relevant page to avoid breaking incoming links:
3337

0 commit comments

Comments
 (0)