Skip to content

Commit 52af3a3

Browse files
committed
restructure and condense
1 parent 900f642 commit 52af3a3

File tree

1 file changed

+15
-43
lines changed

1 file changed

+15
-43
lines changed

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

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ subtitle: Allow users to seamlessly navigate between different products you offe
2626

2727
Each product can contain its own distinct versions, tabs, sections, pages, and API references. Products can share content as well.
2828

29-
Products can be either internal (with their own navigation structure hosted on your docs site) or external (linking to an external URL like a separate application or third-party documentation).
29+
Products can be internal (hosted on your site) or external (linking to external URLs).
3030

3131
## Add products to your docs
3232

@@ -36,6 +36,10 @@ Products can be either internal (with their own navigation structure hosted on y
3636
Create a `products` folder inside of your `fern` folder. To specify a product's contents and navigational structure, add a `.yml` file to the `products` folder for each product.
3737
Make sure to include the `navigation` and `tabs` properties, if applicable.
3838

39+
<Info title="External products">
40+
You can also define external products, which link to external URLs (separate applications, third-party documentation, or other external resources) instead of documentation within your site. They appear in the product switcher but navigate users to the specified URL when selected. Define external products directly in `docs.yml` (no product-specific `.yml` file is needed).
41+
</Info>
42+
3943
```bash {4, 7-8}
4044
fern/
4145
├─ fern.config.json
@@ -45,6 +49,7 @@ fern/
4549
├─ ...
4650
├─ product-a.yml # Contents and navigation for Product A
4751
└─ product-b.yml # Contents and navigation for Product B
52+
# No yml file needed for external products
4853
```
4954

5055
<CodeBlocks>
@@ -96,7 +101,7 @@ The optional parameters are: `image`, `icon`, `subtitle`, `slug`, and `versions`
96101

97102
<Note>If you provide both an `image` and an `icon`, the `image` will take precedence.</Note>
98103

99-
The below example is a `docs.yml` configuration for a site with two products, Product A and Product B.
104+
The below example is a `docs.yml` configuration for a site with two internal products (Product A and Product B) and one external product (Product C).
100105

101106
<CodeBlock title="docs.yml">
102107
```yaml {2-3, 8-9}
@@ -112,56 +117,23 @@ products:
112117
image: ./images/product-b.png # optional
113118
slug: product-b # optional
114119
subtitle: Product B subtitle # optional
120+
121+
- display-name: Product C
122+
href: https://dashboard.example.com # External product
123+
icon: fa-solid fa-chart-line
124+
subtitle: Product C subtitle
115125
```
116126
</CodeBlock>
127+
<Note>
128+
External products (like Product C above) use `href` to link to external URLs and don't require a product-specific `.yml` file in the `products` folder. Optional parameters (`image`, `icon`, `subtitle`) are supported, but versions, tabs, and navigation are not.
129+
</Note>
117130
</Step>
118131
<Step title="Remove extra navigation from docs.yml">
119132

120133
If your `docs.yml` file includes a `navigation` field or a `tabs` field, be sure to remove. Those fields should now belong in the product-specific `.yml` files.
121134
</Step>
122135
</Steps>
123136

124-
## Link to external products
125-
126-
You can configure a product to link to an external URL instead of hosting documentation on your site. This is useful when you want to include links to separate applications, third-party documentation, or other external resources in your product switcher.
127-
128-
External products appear in the product switcher alongside internal products but navigate users to the specified URL when selected.
129-
130-
### Configure an external product
131-
132-
To define an external product, add an item to the `products` list in `docs.yml` with an `href` instead of a `path`. You can still include optional parameters like `image`, `icon`, and `subtitle`.
133-
134-
<CodeBlock title="docs.yml">
135-
```yaml
136-
products:
137-
- display-name: API Documentation
138-
path: ./products/api-docs.yml
139-
icon: fa-solid fa-book
140-
slug: api-docs
141-
subtitle: Complete API reference
142-
143-
- display-name: Dashboard
144-
href: https://dashboard.example.com
145-
icon: fa-solid fa-chart-line
146-
subtitle: Analytics and insights
147-
```
148-
</CodeBlock>
149-
150-
In this example, "API Documentation" is an internal product with its own navigation structure, while "Dashboard" is an external product that links to `https://dashboard.example.com`.
151-
152-
### External product properties
153-
154-
External products support the following properties in `docs.yml`:
155-
156-
- `display-name` (required) - The title displayed in the product switcher
157-
- `href` (required) - External URL to navigate to when the product is selected
158-
- `subtitle` (optional) - Brief description of the product
159-
- `icon` (optional) - Icon to display in the product switcher
160-
- `image` (optional) - Image to display in the product switcher (takes precedence over `icon`)
161-
- `audiences` (optional) - Control visibility across different documentation instances
162-
163-
<Note>External products cannot have versions, tabs, or navigation structures since they link to external URLs.</Note>
164-
165137
### Add versioning to your products
166138

167139
You can optionally add versions to your products. Versioned and unversioned products can live next to each other in your site.

0 commit comments

Comments
 (0)