Skip to content

Commit 45bda5a

Browse files
authored
Merge branch 'main' into docs-polish
2 parents f9ceab8 + ce01d56 commit 45bda5a

File tree

29 files changed

+404
-166
lines changed

29 files changed

+404
-166
lines changed

.github/workflows/check-links.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Check Links
2+
3+
on:
4+
# Run monday mornings
5+
schedule:
6+
- cron: '0 12 * * MON'
7+
workflow_dispatch:
8+
jobs:
9+
check-links:
10+
name: Check links
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
site:
16+
- name: Fern Docs
17+
url: "buildwithfern.com/learn"
18+
steps:
19+
- name: Install link checker
20+
run: pip install linkchecker
21+
- name: Create config
22+
run: echo -e "[csv]\nseparator=,\n[filtering]\nignore=\n\texample.com\n\tus.i.posthog.com\n\tc.vialoops.com/CL0\n[output]\nignoreerrors=\n ^http ^403 Forbidden" > lcconfig
23+
- name: Check ${{ matrix.site.name }} Links
24+
run: |
25+
set +e
26+
cat lcconfig
27+
linkchecker https://${{ matrix.site.url }} --check-extern --no-status --no-warnings --config lcconfig -F csv/utf-8/link_report.csv
28+
29+
if [ $? -ne 0 ]; then
30+
echo "Bad links found. Please see report."
31+
else
32+
echo "Check completed. No issues found."
33+
exit 0
34+
fi
35+
36+
echo "Scan done, generating summary"
37+
38+
started=false
39+
shouldfail=false
40+
while read p; do
41+
# skip comments (top and bottom)
42+
if [[ $p == \#* ]]; then
43+
continue
44+
fi
45+
# make sure first line after comments is skipped
46+
if [[ "$started" = false ]]; then
47+
started=true
48+
continue
49+
fi
50+
51+
IFS=',' read -r -a array <<< "$p"
52+
53+
ret=$(curl -I -s "${array[0]}" -o /dev/null -w "%{http_code}\n")
54+
if [[ $ret == 200 ]]; then
55+
echo "Site now seems to be working, we should continue here"
56+
continue
57+
else
58+
echo "There is still an issue with ${array[0]}"
59+
fi
60+
61+
shouldfail=true
62+
63+
if [[ ${array[10]} == '' ]]; then
64+
echo "::error::URL: ${array[0]} on page: ${array[1]} is returning a ${array[3]}"
65+
else
66+
echo "::error::URL: ${array[0]} linked from '${array[10]}' on page: ${array[1]} is returning a ${array[3]}"
67+
fi
68+
69+
done < link_report.csv
70+
71+
if [[ "$shouldfail" = false ]]; then
72+
exit 0
73+
fi
74+
75+
exit 1
76+
77+
- name: Upload report
78+
if: failure()
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: Report - ${{ matrix.site.name }}
82+
path: link_report.csv

fern/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ redirects:
325325
destination: https://buildwithfern.com/customers
326326
permanent: true
327327
- source: /learn/docs/getting-started/global-configuration
328-
destination: /learn/docs/customization/what-is-docs-yml
328+
destination: /learn/docs/configuration/what-is-docs-yml
329329
permanent: true
330330
- source: /learn/docs/getting-started/development
331331
destination: /learn/docs/preview-publish/previewing-changes-locally
@@ -378,7 +378,7 @@ redirects:
378378
destination: /learn/docs/customization/custom-css-js
379379
permanent: true
380380
- source: /learn/docs/building-and-customizing-your-docs/custom-domain
381-
destination: /learn/docs/getting-started/setting-up-your-domain
381+
destination: /learn/docs/preview-publish/setting-up-your-domain
382382
permanent: true
383383
- source: /learn/docs/building-and-customizing-your-docs/rbac
384384
destination: /learn/docs/authentication/rbac
@@ -549,7 +549,7 @@ redirects:
549549
destination: https://buildwithfern.com/customers
550550
permanent: true
551551
- source: /learn/ask-fern/citations
552-
destination: /learn/ask-fern/configuration/citations
552+
destination: /learn/ask-fern/features/citations
553553
permanent: true
554554
- source: /learn/ask-fern/custom-prompting
555555
destination: /learn/ask-fern/configuration/custom-prompting

fern/products/api-def/openapi-pages/extensions/overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ The table below shows all available extensions and links to detailed documentati
1414
| [`x-fern-audiences`](./audiences) | Filter endpoints, schemas, and properties by audience |
1515
| [`x-fern-availability`](./availability) | Mark availability status (beta, generally-available, deprecated) |
1616
| [`x-fern-base-path`](./base-path) | Set base path prepended to all endpoints |
17-
| [`x-fern-enum`](./enums) | Add descriptions and custom names to enum values |
18-
| [`x-fern-examples`](./examples) | Associate request and response examples |
17+
| [`x-fern-enum`](./enum-descriptions-and-names) | Add descriptions and custom names to enum values |
18+
| [`x-fern-examples`](./request-response-examples) | Associate request and response examples |
1919
| [`x-fern-global-headers`](./global-headers) | Configure headers used across all endpoints |
20-
| [`x-fern-ignore`](./ignore) | Skip reading specific endpoints or schemas |
20+
| [`x-fern-ignore`](./ignoring-elements) | Skip reading specific endpoints or schemas |
2121
| [`x-fern-sdk-method-name`](./method-names) | Customize SDK method names |
2222
| [`x-fern-sdk-group-name`](./method-names) | Organize methods into SDK groups |
2323
| [`x-fern-parameter-name`](./parameter-names) | Customize parameter variable names |
@@ -33,4 +33,4 @@ The table below shows all available extensions and links to detailed documentati
3333

3434
### FastAPI
3535

36-
FastAPI allows you to add extensions directly in your route decorators and models. See our [FastAPI integration guide](/api-definition/openapi/frameworks/fastapi) for detailed examples.
36+
FastAPI allows you to add extensions directly in your route decorators and models. See our [FastAPI integration guide](/learn/api-definitions/openapi/frameworks/fastapi) for detailed examples.
Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: The Fern Folder
2+
title: Project structure
33
description: Describes the Fern folder structure
44
---
55

@@ -15,22 +15,15 @@ fern/
1515
├─ fern.config.json # Root-level config for entire Fern project
1616
├─ generators.yml # Defines SDKs and docs to generate
1717
└─ spec-folder/ # definition, openapi, asyncapi, etc.
18-
└─ spec-file.yml # API specification file
18+
└─ spec-file.yml # API definition file
1919
```
2020

21-
<Info>
22-
For Fern Definition, your API configuration is split across two files: `api.yml` for API-wide configuration and separate `.yml` files for your actual endpoint and type definitions. See [What is a Fern Definition?](/api-definitions/ferndef/overview) for more information.
23-
24-
For the other specification formats ([OpenAPI](/api-definitions/openapi/overview), [AsyncAPI](/api-definitions/asyncapi/overview), [OpenRPC](/api-definitions/openrpc/overview), and [gRPC](/api-definitions/grpc/overview)), you'll have a single self-contained specification file.
25-
</Info>
26-
27-
<AccordionGroup>
28-
<Accordion title="What is the fern.config.json file?">
21+
### `fern.config.json file`
2922

3023
Every fern folder has a single `fern.config.json` file. This file stores the organization and
3124
the version of the Fern CLI that you are using.
3225

33-
```json
26+
```json title="fern.config.json"
3427
{
3528
"organization": "your-organization",
3629
"version": "0.31.2"
@@ -39,35 +32,22 @@ the version of the Fern CLI that you are using.
3932

4033
Every time you run a fern CLI command, the CLI downloads itself at the correct version to ensure
4134
determinism.
42-
</Accordion>
43-
<Accordion title="What is the generators.yml file?">
4435

45-
The `generators.yml` file includes information about where your API definition file is located. It also configures the SDKs you're generating for your API.
36+
### `generators.yml`
37+
38+
The `generators.yml` file includes information about where your API definition file is located. It also [configures the SDKs](/sdks/overview/github) you're generating for your API.
4639

47-
```yaml
40+
```yaml title="generators.yml"
4841
api:
4942
path: ./path/to/openapi.yml
5043
```
51-
</Accordion>
52-
</AccordionGroup>
5344
54-
## Multiple APIs
45+
### API definition file
5546
56-
The fern folder can house multiple API definitions. When you have multiple APIs, nest your definition files within an `apis` folder.
47+
For Fern Definition, your API configuration is split across two files: `api.yml` for API-wide configuration and separate `.yml` files for your actual endpoint and type definitions. See [What is a Fern Definition?](/api-definitions/ferndef/overview) for more information.
5748

58-
Each API must also have a separate `generators.yml` file that specifies the location of the API definition and configures SDK generation.
49+
For the other specification formats ([OpenAPI](/api-definitions/openapi/overview), [AsyncAPI](/api-definitions/asyncapi/overview), [OpenRPC](/api-definitions/openrpc/overview), and [gRPC](/api-definitions/grpc/overview)), you'll have a single self-contained specification file.
5950

60-
```bash
61-
fern/
62-
├─ fern.config.json
63-
├─ generators.yml # Optional: top-level configuration for all APIs
64-
└─ apis/
65-
└─ first-api/ # First API
66-
├─ generators.yml # Required: points to API spec
67-
└─ openapi/
68-
├─ openapi.yml # API Definition file
69-
└─ second-api/ # Second API
70-
├─ generators.yml # Required: points to API spec
71-
└─ openapi/
72-
├─ openapi.yml # API Definition file
73-
```
51+
## Multiple API definitions
52+
53+
<Markdown src="/snippets/multiple-apis.mdx" />

fern/products/ask-fern/pages/getting-started/what-is-ask-fern.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Fern AI Search indexes your documentation and provides an interface for your use
3333
<Card
3434
title="Citations"
3535
icon="regular quote-right"
36-
href="/learn/ai-search/citations"
36+
href="/learn/ask-fern/features/citations"
3737
>
3838
Point users to the exact source of the answer.
3939
</Card>

fern/products/docs/pages/changelog/2025-05-23.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
We've added a `max-toc-depth` frontmatter option to control the depth of the table of contents. Use this to limit the heading ranks included in the table of contents.
44

5-
You can read more about this feature in the [frontmatter documentation](/learn/docs/content/frontmatter#max-depth).
5+
You can read more about this feature in the [frontmatter documentation](/learn/docs/configuration/page-level-settings#max-depth).

fern/products/docs/pages/component-library/custom-components/custom-css-js.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ css:
5656
5757
<Note>
5858
For customizing the background, logo, font, and layout of your Docs via Fern's built-in styling,
59-
check out the [Global Configuration](/learn/docs/getting-started/global-configuration).
59+
check out the [Global Configuration](/learn/docs/configuration/what-is-docs-yml).
6060
</Note>
6161
6262
### Common use cases

fern/products/docs/pages/component-library/default-components/code-blocks.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,16 @@ The `CodeBlocks` component allows you to display multiple code blocks in a tabbe
306306
</Tab>
307307
</Tabs>
308308

309-
## Example of Synchronized Blocks
309+
## Language synchronization
310310

311-
Multiple `CodeBlocks` on a page automatically synchronize, showing the same language across all blocks.
311+
Multiple `CodeBlocks` on a documentation site automatically synchronize. This
312+
means when a user selects a `CodeBlock` with a specific language, all other
313+
`CodeBlocks` across your documentation site with the same language will
314+
automatically sync and switch to match. Language preferences are stored in
315+
client-side local storage and persist across browser sessions.
316+
317+
The example below demonstrates language sync in action – choosing a language in
318+
either set of code blocks will automatically update both sets to match:
312319

313320
<CodeBlocks>
314321
```python title="Python"
@@ -362,6 +369,10 @@ Multiple `CodeBlocks` on a page automatically synchronize, showing the same lang
362369
```
363370
</CodeBlocks>
364371

372+
<Note title="Tabs and CodeBlocks integration">
373+
`CodeBlocks` automatically synchronize with [`<Tab>` components that have a `language` property](/docs/writing-content/components/tabs#language-synchronization).
374+
</Note>
375+
365376
### Override synchronization
366377

367378
You can override the synchronization of code blocks by setting the `for` prop.

0 commit comments

Comments
 (0)