You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/docs/pages/navigation/products.mdx
+15-43Lines changed: 15 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ subtitle: Allow users to seamlessly navigate between different products you offe
26
26
27
27
Each product can contain its own distinct versions, tabs, sections, pages, and API references. Products can share content as well.
28
28
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).
30
30
31
31
## Add products to your docs
32
32
@@ -36,6 +36,10 @@ Products can be either internal (with their own navigation structure hosted on y
36
36
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.
37
37
Make sure to include the `navigation` and `tabs` properties, if applicable.
38
38
39
+
<Infotitle="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
+
39
43
```bash {4, 7-8}
40
44
fern/
41
45
├─ fern.config.json
@@ -45,6 +49,7 @@ fern/
45
49
├─ ...
46
50
├─ product-a.yml # Contents and navigation for Product A
47
51
└─ product-b.yml # Contents and navigation for Product B
52
+
# No yml file needed for external products
48
53
```
49
54
50
55
<CodeBlocks>
@@ -96,7 +101,7 @@ The optional parameters are: `image`, `icon`, `subtitle`, `slug`, and `versions`
96
101
97
102
<Note>If you provide both an `image` and an `icon`, the `image` will take precedence.</Note>
98
103
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).
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>
117
130
</Step>
118
131
<Step title="Remove extra navigation from docs.yml">
119
132
120
133
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.
121
134
</Step>
122
135
</Steps>
123
136
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
-
165
137
### Add versioning to your products
166
138
167
139
You can optionally add versions to your products. Versioned and unversioned products can live next to each other in your site.
0 commit comments