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
+44-13Lines changed: 44 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,9 +111,15 @@ products:
111
111
```
112
112
</CodeBlock>
113
113
</Step>
114
-
<Step title="Add versioning to your products (optional)">
114
+
<Step title="Remove extra navigation from docs.yml">
115
+
116
+
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.
117
+
</Step>
118
+
</Steps>
119
+
120
+
### Add versioning to your products (optional)
115
121
116
-
You can optionally add versions to a product. Versioned and unversioned products can live next to each other in your site. Each version of a single product has its own `yml` file.
122
+
Once you've defined your products, you can optionally add versions. Versioned and unversioned products can live next to each other in your site.
117
123
118
124
In the below example, Product A is **unversioned** and Product B is **versioned**:
119
125
@@ -140,40 +146,65 @@ In the below example, Product A is **unversioned** and Product B is **versioned*
140
146
```
141
147
</CodeBlock>
142
148
149
+
<Steps>
150
+
<Step title="Define your versions">
151
+
Each version of a single product has its own `yml` file. To specify the contents of each version, add a `.yml` file to the `versions` folder to define the navigational structure of that version. Make sure to include the `navigation` and `tabs` properties, if applicable.
Define a version in the top-level `docs.yml` by adding an item to the `versions` list and specifying the `display-name` and `path`.
161
+
143
162
The top-level `doc.yml` configuration for a Fern Docs website containing two products, one unversioned and one versioned, might look something like this:
path: ./products/product-b/latest.yml # relative path to the version file
163
180
- display-name: V2
164
-
path: ./products/product-b/v2.yml
165
-
availability: ga
181
+
path: ./products/product-b/v2.yml # relative path to the version file
166
182
```
167
183
</CodeBlock>
168
184
169
-
For more information on setting up versioned products, follow our [versioning docs](/docs/configuration/versions).
170
185
</Step>
171
-
<Step title="Remove extra navigation from docs.yml">
186
+
<Step title="Indicate availability">
172
187
173
-
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.
<Step title="Remove extra navigation from docs.yml">
203
+
If your `docs.yml` file includes a `navigation` field or a `tabs` field, be sure to remove. Those fields should now belong in the version-specific `.yml` files.
174
204
</Step>
175
205
</Steps>
176
206
207
+
177
208
## Customizing Selector Styling
178
209
179
210
You can directly customize the appearance of the product and version selectors by targeting their CSS classes:
<Note>You can also have multiple products, some versioned and some unversioned. For more information on setting up multiple products, follow our [product switching docs](/docs/configuration/products).</Note>
82
40
</Step>
83
41
<Steptitle="Add your version configuration">
84
42
85
-
To define a version, in `docs.yml`, add an item to the `versions` list, specifying the `display-name` and `path`.
86
-
87
-
```bash
88
-
fern/
89
-
├─ fern.config.json
90
-
├─ generators.yml
91
-
├─ docs.yml
92
-
└─ versions/
93
-
├─ ...
94
-
├─ v2-1.yml
95
-
└─ v2-2.yml
96
-
```
43
+
Define a version in the top-level `docs.yml` by adding an item to the `versions` list and specifying the `display-name` and `path`.
97
44
98
45
<CodeBlocktitle="docs.yml">
99
46
```yaml
100
47
versions:
101
-
- display-name: v2.2 # shown in the dropdown
102
-
path: ./versions/v2-2.yml # relative path to the version file
103
-
- display-name: v2.1
104
-
path: ./versions/v2-1.yml
48
+
- display-name: Latest# shown in the dropdown
49
+
path: ./versions/latest.yml # relative path to the version file
50
+
- display-name: V2
51
+
path: ./versions/v2.yml
105
52
```
106
53
</CodeBlock>
107
54
</Step>
108
55
<Step title="Indicate availability">
109
56
110
-
You can optionally set the availability status for each version. Options are `deprecated`, `ga`, `stable`, and `beta`.
Version availability is distinct from [section and page availability](/learn/docs/configuration/navigation#section-and-page-availability), with different options. If you want to set section and page availability, do so in your version-specific `yml` files.
125
-
126
71
</Step>
127
72
<Step title="Remove extra navigation from docs.yml">
You can optionally set the availability status for each version. Options are `deprecated`, `ga`, `stable`, and `beta`.
2
+
3
+
Version availability is distinct from [section and page availability](/learn/docs/configuration/navigation#section-and-page-availability), with different options. If you want to set section and page availability, do so in your version-specific `yml` files.
0 commit comments