Skip to content

Commit 1103a89

Browse files
committed
clean up pages
1 parent 628be69 commit 1103a89

File tree

5 files changed

+48
-115
lines changed

5 files changed

+48
-115
lines changed

fern/products/docs/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ navigation:
1919
path: ./pages/customization/what-is-docs-yml.mdx
2020
- page: Navigation
2121
path: ./pages/navigation/overview.mdx
22-
- page: Tab variants
23-
path: ./pages/navigation/tab-variants.mdx
22+
- page: Tabs and tab variants
23+
path: ./pages/navigation/tabs.mdx
24+
slug: tabs
2425
- page: Versions
2526
path: ./pages/navigation/versions.mdx
2627
- page: Products

fern/products/docs/pages/changelog/2025-11-03.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<<<<<<< HEAD
1+
22
## Tab variants
33

44
Create multiple content variations within a single tab using the new variants feature. This allows you to show different perspectives, user types, or implementation approaches for the same topic without creating separate tabs.
@@ -25,7 +25,7 @@ navigation:
2525
```
2626
2727
[Learn more about tab variants](/learn/docs/configuration/tab-variants)
28-
=======
28+
2929
## Custom icons across your navigation
3030
3131
You can now use your own image files as icons throughout your `docs.yml` navigation config, including for [navbar link](/learn/docs/configuration/what-is-docs-yml#navbar-links-configuration), [section, page](/learn/docs/configuration/navigation#sidebar-icons), and [product](/learn/docs/configuration/products#add-your-product-configuration) icons.
@@ -72,4 +72,4 @@ products:
7272
```
7373

7474
Visit the [product switching documentation](/learn/docs/configuration/products#define-your-products) to learn more.
75-
>>>>>>> 3a88225d8b04d2e44945e09c402114fc08be058c
75+

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

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -242,59 +242,7 @@ navigation:
242242

243243
## Tabs
244244

245-
Within the navigation, you can add `tabs`. Tabs are used to group sections together. The example below shows tabs for `Help Center`, `API Reference`, and an external link to `Github`. Each tab has a `title` and `icon`.
246-
247-
<Markdown src="/snippets/icons.mdx" />
248-
249-
<CodeBlock title="docs.yml">
250-
{/* <!-- vale off --> */}
251-
252-
```yaml
253-
tabs:
254-
api:
255-
display-name: API Reference
256-
icon: puzzle # Font Awesome icon
257-
help:
258-
display-name: Help center
259-
icon: ./assets/icons/help-icon.svg # Custom image file
260-
github:
261-
display-name: GitHub
262-
icon: brands github # Font Awesome icon
263-
href: https://github.com/fern-api/fern
264-
265-
navigation:
266-
- tab: api
267-
layout:
268-
- section: Introduction
269-
contents:
270-
- page: My page
271-
path: my-page.mdx
272-
- api: API Reference
273-
- tab: help
274-
layout:
275-
- section: Help center
276-
contents:
277-
- page: Contact us
278-
path: contact-us.mdx
279-
- tab: github
280-
```
281-
{/* <!-- vale on --> */}
282-
</CodeBlock>
283-
284-
Here's an example of what the Tabs implementation looks like:
285-
286-
<Frame>
287-
<img src="./images/tabs-sidebar.png" alt="Tabs displayed in the sidebar (default)" />
288-
</Frame>
289-
290-
Tabs display in the left sidebar by default. To display them horizontally, set `tabs-placement` to `header` in your [layout configuration](/docs/configuration/what-is-docs-yml#layout-configuration).
291-
292-
<CodeBlock title="docs.yml">
293-
```yaml
294-
layout:
295-
tabs-placement: header
296-
```
297-
</CodeBlock>
245+
You can add tabs to group sections of content together. Tabs can contain different layouts and navigation structures, and you can use tab variants to show different content variations within a single tab. For more information, see [Tabs and tab variants](/learn/docs/configuration/tabs).
298246

299247
## Versions
300248

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

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
title: Tabs and tab variants
3-
description: Create multiple content variations within a single tab using variants in Fern Docs navigation.
3+
description: Organize your documentation with tabs and show different content variations using tab variants.
44
---
55

6-
Within the navigation, you can add `tabs` to group sections together. The example below shows tabs for `Help Center`, `API Reference`, and an external link to `Github`. Each tab has a `title` and `icon`.
6+
Tabs let you group sections of your documentation together, while tab variants allow you to display different content perspectives within a single tab.
77

8-
<Markdown src="/snippets/icons.mdx" />
8+
## Tabs
99

10-
<CodeBlock title="docs.yml">
10+
Add `tabs` to group sections together. The example below shows tabs for `Help Center`, `API Reference`, and an external link to `Github`. Each tab has a `title` and `icon`.
11+
12+
<CodeBlock>
1113
{/* <!-- vale off --> */}
1214

13-
```yaml
15+
```yaml title="docs.yml"
1416
tabs:
1517
api:
1618
display-name: API Reference
@@ -42,12 +44,18 @@ tabs:
4244
{/* <!-- vale on --> */}
4345
</CodeBlock>
4446
45-
Here's an example of what the Tabs implementation looks like:
47+
<Note title="Tab icons">
48+
<Markdown src="/snippets/icons.mdx" />
49+
</Note>
50+
51+
Here's an example of how a tabs implementation renders:
4652
4753
<Frame>
4854
<img src="./images/tabs-sidebar.png" alt="Tabs displayed in the sidebar (default)" />
4955
</Frame>
5056
57+
### Tabs placement
58+
5159
Tabs display in the left sidebar by default. To display them horizontally, set `tabs-placement` to `header` in your [layout configuration](/docs/configuration/what-is-docs-yml#layout-configuration).
5260

5361
<CodeBlock title="docs.yml">
@@ -60,24 +68,38 @@ layout:
6068

6169
## Tab variants
6270

63-
Tab variants let you display different content variations within a single tab. This is useful for showing different user types, implementation approaches, or experience levels without creating separate tabs.
71+
Tab variants let you display different content variations within a single tab, and [support RBAC](/learn/docs/authentication/rbac). This is useful for showing different user types, implementation approaches, or experience levels without creating separate tabs.
6472

6573
<Tip title="When to use variants vs. tabs">
6674
Use **variants** for different perspectives on the same content area (REST vs. GraphQL, beginner vs. advanced). Use **tabs** for completely different documentation sections (guides vs. API reference).
6775
</Tip>
6876

6977
### Basic usage
7078

71-
Define a tab with a `variants` property instead of a `layout` property. Each variant has its own title and layout.
72-
73-
```yaml title="docs.yml"
74-
tabs:
75-
guides:
76-
display-name: Guides
77-
icon: book
79+
Define a tab with a `variants` property instead of a `layout` property. Each variant has its own title and layout. The example below shows two variants for the `Help Center` tab.
7880

79-
navigation:
80-
- tab: guides
81+
```yaml title="docs.yml" startLine=20 {22-34}
82+
tabs:
83+
api:
84+
display-name: API Reference
85+
icon: puzzle
86+
help:
87+
display-name: Help center
88+
icon: home
89+
github:
90+
display-name: GitHub
91+
icon: brands github
92+
href: https://github.com/fern-api/fern
93+
94+
navigation:
95+
- tab: api
96+
layout:
97+
- section: Introduction
98+
contents:
99+
- page: My page
100+
path: my-page.mdx
101+
- api: API Reference
102+
- tab: help
81103
variants:
82104
- title: For developers
83105
layout:
@@ -91,12 +113,9 @@ navigation:
91113
contents:
92114
- page: Overview
93115
path: ./pages/pm-overview.mdx
116+
- tab: github
94117
```
95118

96-
<Info title="RBAC">
97-
Variants support role-based access control. For more information, see [Role based access control](/learn/docs/authentication/rbac).
98-
</Info>
99-
100119
### Variant properties
101120

102121
<ParamField path="title" type="string" required={true}>
@@ -112,7 +131,7 @@ Variants support role-based access control. For more information, see [Role base
112131
</ParamField>
113132

114133
<ParamField path="icon" type="string">
115-
[Font Awesome icon](https://fontawesome.com/icons) name
134+
<Markdown src="/snippets/icons.mdx" />
116135
</ParamField>
117136

118137
<ParamField path="slug" type="string">
@@ -139,38 +158,3 @@ Variants support role-based access control. For more information, see [Role base
139158
Conditional display configuration
140159
</ParamField>
141160

142-
<Accordion title="Complete example">
143-
144-
```yaml title="docs.yml"
145-
tabs:
146-
documentation:
147-
display-name: Documentation
148-
icon: book
149-
150-
navigation:
151-
- tab: documentation
152-
variants:
153-
- title: REST API
154-
subtitle: HTTP-based integration
155-
icon: fa-solid fa-code
156-
slug: rest
157-
default: true
158-
layout:
159-
- section: Authentication
160-
contents:
161-
- page: API keys
162-
path: ./pages/rest/auth.mdx
163-
- api: REST API Reference
164-
165-
- title: GraphQL API
166-
subtitle: Query-based integration
167-
icon: fa-solid fa-diagram-project
168-
slug: graphql
169-
layout:
170-
- section: Authentication
171-
contents:
172-
- page: OAuth setup
173-
path: ./pages/graphql/auth.mdx
174-
- api: GraphQL API Reference
175-
```
176-
</Accordion>

fern/snippets/icons.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Icons support three formats:
1+
Icons can be in three formats:
22
- **Font Awesome icons**: Use icon names like `fa-solid fa-rocket`. Pro and Brand Icons from Font Awesome are supported.
33
- **Custom image files**: Use relative paths to image files (e.g., `./assets/icons/my-icon.svg` or `../assets/icons/my-icon.png`). Paths are relative to the `docs.yml` file.
44
- **Inline SVG**: Provide an SVG string wrapped in quotes (e.g., `"<svg>...</svg>"`).

0 commit comments

Comments
 (0)