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: _ru/scala3/guides/scaladoc/site-versioning.md
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,19 @@ previous-page: blog
8
8
next-page: search-engine
9
9
---
10
10
11
-
Scaladoc provides a convenient way to switch between different versions of the documentation. The feature is useful if we want to expose older docs for users that didn't migrate to the new version of our library.
11
+
Scaladoc предоставляет удобный способ переключения между различными версиями документации.
12
+
Эта функция полезна, когда желательно оставить старые версии документации пользователям,
13
+
которые ещё не перешли на новую версию библиотеки.
12
14
13
-
### How to setup it
15
+
### Как это настроить
14
16
15
-
The feature was designed for easy scalability with no need to regenerate all scaladocs after adding a new version. To do so a new setting is introduced: `-versions-dictionary-url`. Its argument must be a URL to a JSON document holding information about the locations of specific versions. The JSON file has single property `versions` that holds the dictionary associating the labels of specific versions of the documentation to the URLs pointing to their index.html
17
+
Эта функция была разработана для легкой масштабируемости без необходимости повторного создания всех scaladocs
18
+
после добавления новой версии. Для этого вводится новая настройка: `-versions-dictionary-url`.
19
+
Его аргумент должен быть URL-адресом документа JSON, содержащего информацию о расположении конкретных версий.
20
+
Файл JSON должен содержать свойство `versions` со словарём,
21
+
связывающий метки определенных версий документации с URL-адресами, указывающими на их `index.html`.
16
22
17
-
Example JSON file:
23
+
Пример JSON-файла:
18
24
```
19
25
{
20
26
"versions": {
@@ -24,17 +30,22 @@ Example JSON file:
24
30
}
25
31
```
26
32
27
-
This enforce us to provide the setting while generating docs for each of the versions, however it gives us more flexibility later. If you want to add a version of the API docs next to the previous 5 versions that you have already published, then you only need to upload the new docs to a web server and add a new entry to the JSON file. All versions of the site will now become aware of the new site version.
33
+
Такие документы необходимо указывать для каждой из версий, однако позже это дает больше гибкости.
34
+
Если необходимо добавить версию документов API рядом с предыдущими 5 версиями, которые уже опубликованы,
35
+
нужно только загрузить новые документы на веб-сервер и добавить новую запись в файл JSON.
36
+
Все версии сайта теперь узнают о новой версии.
28
37
29
-
The important thing to note is that there is only one JSON file to avoid redundancy and each scaladoc must set up its URL location beforehand, for example, in sbt:
38
+
Важно отметить, что существует только один файл JSON, чтобы избежать избыточности,
39
+
и каждый scaladoc должен заранее настроить свой URL-адрес, например, в sbt:
Providing a JSON file via `-versions-dictionary-url` enables scaladoc to link between versions. It is also convenient to be able to change the revision label in the drop-down menu. Everything will change automatically.
48
+
Предоставление файла JSON через `-versions-dictionary-url` позволяет scaladoc связывать версии.
49
+
Также удобно иметь возможность изменить метку ревизии в выпадающем меню. Все изменится автоматически.
0 commit comments