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: settings/versioning.mdx
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: 'Versioning & Localization'
3
-
description: 'Build separate versions or localizations'
4
-
icon: 'square-chevron-down'
2
+
title: "Versioning & Localization"
3
+
description: "Build separate versions or localizations"
4
+
icon: "square-chevron-down"
5
5
---
6
6
7
7
Mintlify supports versioning or localization. You can use one or the other, not both.
@@ -49,14 +49,17 @@ You can also specify the version of a single page in the page metadata. Versions
49
49
50
50
```yaml Pages (quickstart.mdx)
51
51
---
52
-
title: 'Quickstart'
53
-
version: 'v2'
52
+
title: "Quickstart"
53
+
version: "v2"
54
54
---
55
55
```
56
+
56
57
</CodeGroup>
57
58
58
59
<Warning>
59
-
While it is possible to nest versioned groups within versioned groups, it is not recommended. If you do take this approach, the more deeply-nested version takes precedence.
60
+
While it is possible to nest versioned groups within versioned groups, it is
61
+
not recommended. If you do take this approach, the more deeply-nested version
62
+
takes precedence.
60
63
</Warning>
61
64
62
65
#### Versioning Tabs and Anchors
@@ -104,14 +107,18 @@ In `mint.json`, simply add `version` to your tab or anchor. Tabs and anchors wit
104
107
},
105
108
],
106
109
```
110
+
107
111
</CodeGroup>
108
112
109
113
#### Sharing Between Versions
110
114
111
115
Not _all_ content has to be hidden though! Any content without a specified version appears in every version so you don't have to duplicate content!
112
116
113
117
<Tip>
114
-
When using localization with versioning, each version can have its own set of translations. This means you can have different language versions for different API versions, giving you full flexibility in managing both versioned and localized content.
118
+
When using localization with versioning, each version can have its own set of
119
+
translations. This means you can have different language versions for
120
+
different API versions, giving you full flexibility in managing both versioned
121
+
and localized content.
115
122
</Tip>
116
123
117
124
### Troubleshooting
@@ -123,6 +130,7 @@ Common errors and how to fix them
123
130
You likely nested a version inside of another. For example, your group had version "v1" but your page had version "v2".
124
131
125
132
We do not recommend nesting versions inside of each other because it's hard to maintain your docs later.
@@ -136,13 +144,11 @@ Common errors and how to fix them
136
144
137
145
### Setup
138
146
139
-
`"versions"` in your `mint.json` can be leveraged to create different language versions. The first localization from the array serves as the default localization.
147
+
`"versions"` in your `mint.json` can be leveraged to create different language versions by adding a `locale` value to the version. The first localization from the array serves as the default localization.
140
148
141
-
We currently support localization in English (`en`), Chinese, Spanish (`es`), French (`fr`), Japanese, and Portuguese.
149
+
We currently support localization in English (`en`), Chinese (`cn`), Spanish (`es`), French (`fr`), Japanese (`jp`), Portuguese (`pt`), and German (`de`).
142
150
143
-
Set your localization in your `mint.json` file like this:
144
-
145
-
```json
151
+
```json mint.json example
146
152
"versions": [
147
153
{
148
154
"name": "English",
@@ -160,8 +166,8 @@ Set your localization in your `mint.json` file like this:
160
166
```
161
167
162
168
<Tip>
163
-
The versions dropdown will show your localizations in the order you include them in
164
-
`mint.json`.
169
+
The versions dropdown will show your localizations in the order you include
170
+
them in `mint.json`.
165
171
</Tip>
166
172
167
-
Once setup, the rest of localization is handled by the versioning setup described above.
173
+
Once setup, the rest of localization is handled by the versioning setup described above.
0 commit comments