-
Notifications
You must be signed in to change notification settings - Fork 7
Add missing-redirects check mention to redirects and slug pages #5177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bfe4489
3c0e090
cc27aa3
f28e23d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,12 +12,16 @@ subtitle: Learn how to configure redirects in Fern Docs. Set up exact path redir | |
| To add external links to your sidebar navigation, see [Navigation](/learn/docs/configuration/navigation#links). | ||
| </Tip> | ||
|
|
||
| ## Catching missing redirects | ||
|
|
||
| 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. | ||
|
|
||
| <llms-only> | ||
| ## Common errors | ||
|
|
||
| Errors below are surfaced by `fern check` and `fern generate --docs`. | ||
|
|
||
| ### Page "X" was moved from "/old" to "/new". The old URL will return 404 without a redirect. | ||
| ### 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] reported by reviewdog 🐶 |
||
|
|
||
| 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: | ||
|
|
||
|
|
@@ -27,7 +31,7 @@ redirects: | |
| destination: /new | ||
| ``` | ||
|
|
||
| ### Page "X" was removed. The previously published URL "/old" will return 404 without a redirect. | ||
| ### 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] reported by reviewdog 🐶 |
||
|
|
||
| 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: | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[FernStyles.Current] Avoid time-relative terms like 'old' that become outdated