Skip to content

Commit 9c01da2

Browse files
docs: inline-link existing terms in Common errors descriptions
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
1 parent f433aed commit 9c01da2

7 files changed

Lines changed: 18 additions & 18 deletions

File tree

fern/products/docs/pages/authentication/rbac.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ You can also combine `roles` with `products` and `versions` props.
8080
## Common errors
8181

8282
<Accordion title='Role "X" is used but not declared at the top level of the docs.yml file.'>
83-
A `viewers:` entry or `<If roles={[...]}>` reference uses a role that isn't listed under the top-level `roles:` key in `docs.yml`. Add the role to the `roles` list:
83+
A [`viewers:`](#in-navigation) entry or [`<If roles={[...]}>`](/learn/docs/writing-content/components/if) reference uses a role that isn't listed under the top-level `roles:` key in `docs.yml`. Add the role to the [`roles`](#setup) list:
8484

8585
```yaml title="docs.yml"
8686
roles:

fern/products/docs/pages/navigation/frontmatter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Frontmatter uses YAML syntax, but values are also processed as MDX. Some charact
4040
| `"` `'` | Opposite style or `\` | `title: 'The "best" practices'` |
4141

4242
<Info title='Error: "Failed to parse frontmatter"'>
43-
If `fern check` reports `Failed to parse frontmatter`, the YAML between the `---` markers is invalid. The most common cause is an unquoted value containing one of the special characters above. Wrap the value in quotes or escape the character and re-run `fern check`.
43+
If `fern check` reports `Failed to parse frontmatter`, the [YAML](#frontmatter-syntax) between the `---` markers is invalid. The most common cause is an unquoted value containing one of the [special characters](#special-characters) above. Wrap the value in quotes or escape the character and re-run `fern check`.
4444
</Info>
4545

4646
## Title

fern/products/docs/pages/navigation/tabs.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ theme:
131131

132132
<AccordionGroup>
133133
<Accordion title='Tab "X" is missing from the tabs configuration.'>
134-
The `navigation` list references a tab key that isn't declared under the top-level `tabs` object. Add the tab to `tabs:` in `docs.yml` (with at least a `display-name`), or update the `- tab:` reference in `navigation` to match an existing key.
134+
The [`navigation`](/learn/docs/configuration/navigation) list references a tab key that isn't declared under the top-level `tabs` object. Add the tab to `tabs:` in `docs.yml` (with at least a [`display-name`](#tab-properties)), or update the `- tab:` reference in `navigation` to match an existing key.
135135
</Accordion>
136136
<Accordion title='Tab "X" has both a href and layout. Only one should be used.'>
137-
A tab entry combines `href` with `layout` or `variants`. Use `href` for external links, or `layout`/`variants` for internal content — not both.
137+
A tab entry combines [`href`](#tab-properties) with [`layout`](#tab-properties) or [`variants`](#tab-variants). Use `href` for external links, or `layout`/`variants` for internal content — not both.
138138
</Accordion>
139139
<Accordion title='Tab "X" is missing a href, layout, or variants.'>
140-
Every tab in `navigation` must point somewhere. Add a `layout`, `variants`, or `href` to the tab entry.
140+
Every tab in [`navigation`](/learn/docs/configuration/navigation) must point somewhere. Add a [`layout`](#tab-properties), [`variants`](#tab-variants), or [`href`](#tab-properties) to the tab entry.
141141
</Accordion>
142142
</AccordionGroup>
143143

fern/products/docs/pages/preview-publish/preview-changes-locally.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ Some features are disabled in local development:
5252

5353
<AccordionGroup>
5454
<Accordion title="No docs.yml file found. Please make sure your project has one.">
55-
`fern docs dev` and `fern generate --docs` must be run from a directory that contains a `fern/` folder with a `docs.yml` inside. Change into your project directory, or create a `docs.yml` — see [Project structure](/learn/docs/getting-started/project-structure).
55+
`fern docs dev` and `fern generate --docs` must be run from a directory that contains a [`fern/` folder](/learn/docs/getting-started/project-structure) with a `docs.yml` inside. Change into your project directory, or add a `docs.yml`.
5656
</Accordion>
5757
<Accordion title="Broken link to /some/path (resolved path: ...)">
5858
`fern check` reports this when a link in a Markdown page doesn't resolve to a real page, anchor, or file in your docs.
5959

60-
- For internal pages, use the [published URL path](/learn/docs/writing-content/markdown-basics#link-format) from your `docs.yml` config (for example, `/learn/docs/configuration/navigation`) — not a relative path or on-disk file path.
61-
- For images and other assets, use a path relative to the Markdown file.
60+
- For [internal pages](/learn/docs/writing-content/markdown-basics#link-format), use the published URL path from your `docs.yml` config (for example, `/learn/docs/configuration/navigation`) — not a relative path or on-disk file path.
61+
- For [images and other assets](/learn/docs/writing-content/markdown-media), use a path relative to the Markdown file.
6262

6363
Broken internal links fail by default. Use [`fern generate --docs --no-strict-broken-links`](/learn/cli-api-reference/cli-reference/commands#fern-generate) to downgrade the failure to a warning while you fix them.
6464
</Accordion>
6565
<Accordion title="Invalid URL: /some/path">
6666
A Markdown link or `<img src>` uses a value that isn't a valid URL. Check for typos, unescaped characters, or missing protocols on external links.
6767
</Accordion>
6868
<Accordion title="Path ./pages/foo.mdx does not exist">
69-
A `path:` in `docs.yml` points to a file that isn't on disk. Fix the path or create the missing file. Paths are relative to the YAML file that defines them.
69+
A [`path:`](/learn/docs/configuration/navigation) in `docs.yml` points to a file that isn't on disk. Fix the path or create the missing file. Paths are relative to the YAML file that defines them.
7070
</Accordion>
7171
</AccordionGroup>
7272

fern/products/docs/pages/preview-publish/publishing-your-docs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ To unpublish a docs site, navigate to the **Settings** page for your site in the
196196

197197
<AccordionGroup>
198198
<Accordion title="No token found. Please set the FERN_TOKEN environment variable or run `fern login`.">
199-
`fern generate --docs` needs an authenticated session to publish. Run `fern login` locally, or set `FERN_TOKEN` in your shell or CI environment. Use [`fern token`](/learn/cli-api-reference/cli-reference/commands#fern-token) to generate a CI-friendly token.
199+
`fern generate --docs` needs an authenticated session to publish. Run [`fern login`](/learn/cli-api-reference/cli-reference/commands#fern-login) locally, or set `FERN_TOKEN` in your shell or CI environment. Use [`fern token`](/learn/cli-api-reference/cli-reference/commands#fern-token) to generate a CI-friendly token.
200200
</Accordion>
201201
<Accordion title="OpenAPI spec validation failed with N errors. Fix the errors above before generating docs.">
202-
One or more OpenAPI specs referenced by the docs have fatal validation errors. The individual `<file>: <message>` lines above this message identify the exact problem — fix those in your spec, then re-run `fern generate --docs`.
202+
One or more [OpenAPI specs](/learn/docs/api-references/overview) referenced by the docs have fatal validation errors. The individual `<file>: <message>` lines above this message identify the exact problem — fix those in your spec, then re-run `fern generate --docs`.
203203
</Accordion>
204204
</AccordionGroup>
205205

fern/products/docs/pages/preview-publish/setting-up-your-domain.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Errors below are surfaced by `fern check` and `fern generate --docs` when valida
206206
The `url` is missing a subdomain or uses an unexpected shape. Use `<your-org>.docs.buildwithfern.com` (for example, `plantstore.docs.buildwithfern.com`). Don't include `https://`.
207207
</Accordion>
208208
<Accordion title='Invalid domain in URL "X". The URL must end with one of: docs.buildwithfern.com, docs.dev.buildwithfern.com'>
209-
The `url` doesn't end with a supported Fern domain. Update the `url` to end with `docs.buildwithfern.com`. Configure your vanity domain with `custom-domain`.
209+
The `url` doesn't end with a supported Fern domain. Update the `url` to end with `docs.buildwithfern.com`. Configure your vanity domain with [`custom-domain`](#multiple-custom-domains).
210210
</Accordion>
211211
<Accordion title='Invalid URL "X". A subdomain is required before docs.buildwithfern.com'>
212212
The `url` is set to the bare domain. Add a subdomain prefix such as `<your-org>.docs.buildwithfern.com`.
@@ -227,4 +227,4 @@ instances:
227227

228228
<Info>
229229
After configuring multiple domains in your `docs.yml`, contact Fern via your dedicated Slack channel or [email](mailto:support@buildwithfern.com) to complete the setup. You'll receive DNS configuration details for each domain.
230-
</Info>
230+
</Info>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ Errors below are surfaced by `fern check` and `fern generate --docs`.
1818

1919
<AccordionGroup>
2020
<Accordion title='Page "X" was moved from "/old" to "/new". The old URL will return 404 without a redirect.'>
21-
A page's slug changed relative to the last published version of your docs. Add a redirect in `docs.yml` so existing links keep working:
21+
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:
2222

2323
```yaml title="docs.yml"
2424
redirects:
2525
- source: /old
2626
destination: /new
2727
```
2828
</Accordion>
29-
<Accordion title='Page "X" was removed. The previously published URL "/old" will return 404 without a redirect.'>
30-
A published page no longer exists in the navigation. Add a redirect to another relevant page to avoid breaking incoming links:
29+
<Accordion title='Page "X" was removed. The previously [published](/learn/docs/preview-publish/publishing-your-docs) URL "/old" will return 404 without a redirect.'>
30+
A published page 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:
3131
3232
```yaml title="docs.yml"
3333
redirects:
@@ -36,10 +36,10 @@ Errors below are surfaced by `fern check` and `fern generate --docs`.
3636
```
3737
</Accordion>
3838
<Accordion title='Redirect from "/path" to "/path" creates an infinite loop (source equals destination).'>
39-
A redirect's `source` and `destination` are the same path. Remove the redirect or point the `destination` at a different URL.
39+
A [redirect](/learn/docs/configuration/site-level-settings#redirects-configuration)'s `source` and `destination` are the same path. Remove the redirect or point the `destination` at a different URL.
4040
</Accordion>
4141
<Accordion title="Circular redirect chain detected: /a → /b → /a">
42-
Two or more redirects form a cycle. Update the chain so each `source` eventually resolves to a single final `destination`.
42+
Two or more [redirects](/learn/docs/configuration/site-level-settings#redirects-configuration) form a cycle. Update the chain so each `source` eventually resolves to a single final `destination`.
4343
</Accordion>
4444
</AccordionGroup>
4545

0 commit comments

Comments
 (0)