Skip to content

Commit a6bcf7f

Browse files
devin-ai-integration[bot]chdeskurdevalog
authored
Document external product links feature (#1710)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Catherine Deskur <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent 3541815 commit a6bcf7f

File tree

2 files changed

+65
-27
lines changed

2 files changed

+65
-27
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## External product links
2+
3+
You can now configure products to link to external URLs (separate applications, third-party documentation, or other external resources) instead of documentation within your site.
4+
5+
External products appear in the product switcher alongside internal products but navigate users to the specified URL when selected. Unlike internal products, external products are defined directly in `docs.yml` using `href`—no standalone product `.yml` file is needed.
6+
7+
To define an external product, add an item to the `products` list in `docs.yml` with an `href` instead of a `path`:
8+
9+
```yaml title="docs.yml"
10+
products:
11+
- display-name: API Documentation
12+
path: ./products/api-docs.yml
13+
icon: fa-solid fa-book
14+
slug: api-docs
15+
subtitle: Complete API reference
16+
17+
- display-name: Dashboard # External product
18+
href: https://dashboard.example.com
19+
icon: fa-solid fa-chart-line
20+
subtitle: Analytics and insights
21+
```
22+
23+
Visit the [product switching documentation](/learn/docs/configuration/products#define-your-products) to learn more.

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

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ 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 internal (hosted on your site) or external (linking to external URLs).
30+
2931
## Add products to your docs
3032

3133
<Steps toc={true}>
@@ -34,6 +36,10 @@ Each product can contain its own distinct versions, tabs, sections, pages, and A
3436
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.
3537
Make sure to include the `navigation` and `tabs` properties, if applicable.
3638

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+
3743
```bash {4, 7-8}
3844
fern/
3945
├─ fern.config.json
@@ -43,6 +49,7 @@ fern/
4349
├─ ...
4450
├─ product-a.yml # Contents and navigation for Product A
4551
└─ product-b.yml # Contents and navigation for Product B
52+
# No separate yml file needed for external products
4653
```
4754

4855
<CodeBlocks>
@@ -89,45 +96,53 @@ tabs:
8996
</Step>
9097
<Step title="Add your product configuration">
9198
92-
To define a product, add an item to the `products` list in `docs.yml`, specifying the `display-name` and `path`.
93-
94-
The optional parameters are: `image`, `icon`, `subtitle`, `slug`, and `versions`. If you provide both an `image` and an `icon`, the `image` will take precedence.
99+
To define a product, add an item to the `products` list in `docs.yml`, specifying the `display-name` and either `path` (for internal products) or `href` (for external products).
95100

101+
For both internal and external products, `image`, `icon`, and `subtitle` are optional parameters. If you provide both an `image` and an `icon`, the `image` will take precedence. Internal products additionally support the optional `slug` and `versions` parameters.
102+
96103
<Note title="Product icons">
97-
98104
<Markdown src="/snippets/icons.mdx" />
99-
100-
<CodeBlock title="docs.yml">
101-
```yaml maxLines=5
102-
products:
103-
- display-name: Product A
104-
path: ./products/product-a.yml
105-
icon: fa-solid fa-leaf # Font Awesome icon
106-
slug: product-a
107-
subtitle: Product A subtitle
108-
- display-name: Product B
109-
path: ./products/product-b.yml
110-
icon: ./assets/icons/product-b-icon.svg # Custom image file
111-
slug: product-b
112-
subtitle: Product B subtitle
113-
- display-name: Product C
114-
path: ./products/product-c.yml
115-
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z'/></svg>" # Inline SVG
116-
slug: product-c
117-
subtitle: Product C subtitle
118-
```
119-
</CodeBlock>
120105
</Note>
106+
107+
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).
108+
109+
<CodeBlock title="docs.yml">
110+
```yaml {2-3, 8-9, 14-15}
111+
products:
112+
- display-name: Product A
113+
path: ./products/product-a.yml
114+
icon: fa-solid fa-leaf # Font Awesome icon
115+
slug: product-a # optional
116+
subtitle: Product A subtitle # optional
117+
118+
- display-name: Product B
119+
path: ./products/product-b/versions/latest/latest.yml # <-- default showing latest
120+
icon: ./assets/icons/product-b-icon.svg # Custom image file
121+
slug: product-b # optional
122+
subtitle: Product B subtitle # optional
123+
124+
- display-name: Product C
125+
href: https://dashboard.example.com # External product
126+
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z'/></svg>" # Inline SVG
127+
subtitle: Product C subtitle
128+
```
129+
</CodeBlock>
130+
121131
</Step>
122132
<Step title="Remove extra navigation from docs.yml">
123133

124134
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.
135+
136+
<Note>
137+
External products don't support `navigation` and `tabs` fields.
138+
</Note>
139+
125140
</Step>
126141
</Steps>
127142

128143
### Add versioning to your products
129144

130-
You can optionally add versions to your products. Versioned and unversioned products can live next to each other in your site.
145+
You can optionally add versions to your internal products. Versioned and unversioned products can live next to each other in your site. Versions are not supported for external products.
131146

132147
<Note>For standalone versioning without products, see our [Versioning guide](/docs/configuration/versions).</Note>
133148

@@ -330,4 +345,4 @@ The dropdown menus for product and version selectors can be customized using the
330345
<img src="webflow-version-selector.avif" alt="Example of a styled version selector" />
331346
</Frame>
332347
</Tab>
333-
</Tabs>
348+
</Tabs>

0 commit comments

Comments
 (0)