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/overview.mdx
+50-37Lines changed: 50 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ navigation:
21
21
path: ./intro.mdx
22
22
- page: Authentication
23
23
path: ./auth.mdx
24
-
- api: API Reference
24
+
- api: API reference
25
25
navbar-links:
26
26
- type: secondary
27
27
text: Contact support
@@ -40,26 +40,27 @@ In `contents`, list your pages with names and corresponding file paths. The supp
40
40
41
41
A basic navigation configuration with two sections is shown below. The first section is called `Introduction` and contains a single page called `My Page`. The second section is called **API Reference**. This is a special type of section that's automatically generated by Fern, and you don't need to add any pages to it by hand. For more information, see the [Generate API Reference](/learn/docs/api-references/generate-api-ref) page.
42
42
43
+
{/* <!-- vale off --> */}
43
44
```yaml Example navigation config
44
45
navigation:
45
46
- section: Introduction
46
47
contents:
47
-
- page: My Page
48
+
- page: My page
48
49
path: ./pages/my-page.mdx
49
-
- api: API Reference
50
+
- api: API reference
50
51
```
51
-
52
+
{/* <!-- vale on --> */}
52
53
If you want to add another page to an existing section, create an `.md` or `.mdx` file. Then in `docs.yml`, create a new `page` in the `contents` list for that section, providing the path to the `.md` or `.mdx` file you created. Example:
53
-
54
+
{/* <!-- vale off --> */}
54
55
```yaml Example navigation config
55
56
navigation:
56
57
- section: Introduction
57
58
contents:
58
-
- page: My Page
59
+
- page: My page
59
60
path: ./pages/my-page.mdx
60
-
- page: Another Page
61
+
- page: Another page
61
62
path: ./pages/another-page.mdx
62
-
- api: API Reference
63
+
- api: API reference
63
64
```
64
65
65
66
To add another section, add another `section` to the `navigation`. Example:
@@ -68,34 +69,37 @@ To add another section, add another `section` to the `navigation`. Example:
68
69
navigation:
69
70
- section: Introduction
70
71
contents:
71
-
- page: My Page
72
+
- page: My page
72
73
path: ./pages/my-page.mdx
73
-
- api: API Reference
74
-
- section: Help Center
74
+
- api: API reference
75
+
- section: Help center
75
76
contents:
76
-
- page: Contact Us
77
+
- page: Contact us
77
78
path: contact-us.mdx
78
79
```
80
+
{/* <!-- vale on --> */}
79
81
80
82
### Hiding content
81
83
82
84
To hide a page or an entire section of your docs, add `hidden: true`. A hidden page or section will still be discoverable using the exact URL, but it will be excluded from search and won't be indexed.
83
85
86
+
{/* <!-- vale off --> */}
84
87
```yaml Example navigation config with additional section {7, 10}
To add an overview page to a section, add a `path` property to the section.
129
133
134
+
{/* <!-- vale off --> */}
130
135
```yaml Example section with an overview {7}
131
136
navigation:
132
137
- section: Introduction
133
138
contents:
134
-
- page: My Page
139
+
- page: My page
135
140
path: ./pages/my-page.mdx
136
141
- section: Guides
137
142
path: ./pages/guide-overview.mdx
138
143
contents:
139
-
- page: Simple Guide
144
+
- page: Simple guide
140
145
path: ./pages/guides/simple.mdx
141
-
- page: Complex Guide
146
+
- page: Complex guide
142
147
path: ./pages/guides/complex.mdx
143
148
```
149
+
{/* <!-- vale on --> */}
144
150
145
151
## Nested sections
146
152
@@ -152,15 +158,15 @@ navigation:
152
158
layout:
153
159
- section: Learn
154
160
contents:
155
-
- section: Key Concepts
161
+
- section: Key concepts
156
162
contents:
157
163
- page: Embeddings
158
164
path: ./docs/pages/embeddings.mdx
159
-
- page: Prompt Engineering
165
+
- page: Prompt engineering
160
166
path: ./docs/pages/prompts.mdx
161
167
- section: Generation
162
168
contents:
163
-
- page: Command Nightly
169
+
- page: Command nightly
164
170
path: ./docs/pages/command.mdx
165
171
- page: Likelihood
166
172
path: ./docs/pages/likelihood.mdx
@@ -177,11 +183,11 @@ This helps keep the navigation tidy when you have many sections or want to highl
177
183
178
184
```yaml {7} Example config with collapsed section
179
185
navigation:
180
-
- section: Getting Started
186
+
- section: Getting started
181
187
contents:
182
188
- page: Introduction
183
189
path: ./pages/intro.mdx
184
-
- section: Advanced Topics
190
+
- section: Advanced topics
185
191
collapsed: true
186
192
contents:
187
193
- page: Custom CSS
@@ -194,31 +200,35 @@ navigation:
194
200
195
201
For icons to appear next to sections and pages, add the `icon` key. The value should be a valid [Font Awesome icon](https://fontawesome.com/icons) name. Pro and Brand Icons from Font Awesome are supported.
196
202
203
+
{/* <!-- vale off --> */}
197
204
```yaml Example navigation config with icons
198
205
navigation:
199
206
- section: Home
200
207
icon: fa-regular fa-home
201
208
contents:
202
-
- page: My Page
209
+
- page: My page
203
210
icon: fa-regular fa-file
204
211
path: ./pages/my-page.mdx
205
-
- api: API Reference
212
+
- api: API reference
206
213
icon: fa-regular fa-puzzle
207
214
```
215
+
{/* <!-- vale on --> */}
208
216
209
217
## Links
210
218
211
219
You can add a link to an external page within your sidebar navigation with the following configuration:
212
220
221
+
{/* <!-- vale off --> */}
213
222
```yaml title="docs.yml"
214
223
navigation:
215
224
- section: Home
216
225
contents:
217
226
- page: Introduction
218
227
path: ./intro.mdx
219
-
- link: Our YouTube Channel
228
+
- link: Our YouTube channel
220
229
href: https://www.youtube.com/
221
230
```
231
+
{/* <!-- vale on --> */}
222
232
223
233
<Frame>
224
234
<img src="./external-link.png" alt="An external link within navigation" />
@@ -229,13 +239,15 @@ navigation:
229
239
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`. [Browse the icons available](https://fontawesome.com/icons) from Font Awesome. Pro and Brand Icons are supported.
230
240
231
241
<CodeBlock title="docs.yml">
242
+
{/* <!-- vale off --> */}
243
+
232
244
```yaml
233
245
tabs:
234
246
api:
235
-
display-name: API Reference
247
+
display-name: API reference
236
248
icon: puzzle
237
249
help:
238
-
display-name: Help Center
250
+
display-name: Help center
239
251
icon: home
240
252
github:
241
253
display-name: GitHub
@@ -247,17 +259,18 @@ tabs:
247
259
layout:
248
260
- section: Introduction
249
261
contents:
250
-
- page: My Page
262
+
- page: My page
251
263
path: my-page.mdx
252
264
- api: API Reference
253
265
- tab: help
254
266
layout:
255
-
- section: Help Center
267
+
- section: Help center
256
268
contents:
257
-
- page: Contact Us
269
+
- page: Contact us
258
270
path: contact-us.mdx
259
271
- tab: github
260
272
```
273
+
{/* <!-- vale on --> */}
261
274
</CodeBlock>
262
275
263
276
Here's an example of what the Tabs implementation looks like:
0 commit comments