diff --git a/CHANGELOG b/CHANGELOG index c8f20228e..72323a113 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ mkdocs-material-2.x.x (2017-xx-xx) + * Added Russian translations * Fixed #553: meta title and description only renders first character * Fixed favicon regression caused by deprecation upstream diff --git a/docs/getting-started.md b/docs/getting-started.md index a66448bbe..d45ef822d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -163,6 +163,8 @@ See the guide on [customization][11] for more information. #### Primary colors +> Default: `indigo` + Click on a tile to change the primary color of the theme: @@ -196,6 +198,8 @@ Click on a tile to change the primary color of the theme: #### Accent colors +> Default: `indigo` + Click on a tile to change the accent color of the theme: @@ -226,6 +230,8 @@ Click on a tile to change the accent color of the theme: ### Font family +> Default: `Roboto` and `Roboto Mono` + By default the [Roboto font family][12] is included with the theme, specifically the regular sans-serif type for text and the `monospaced` type for code. Both fonts are loaded from [Google Fonts][13] and can be changed to other fonts, @@ -253,6 +259,8 @@ theme: ### Logo +> Default icon: `school` + Your logo should have rectangular shape with a minimum resolution of 128x128, leave some room towards the edges and be composed of high contrast areas on a transparent ground, as it will be placed on the colored header bar and drawer. @@ -278,11 +286,13 @@ theme: #### Localization +> Default: `en` + Material for MkDocs supports internationalization (i18n) and provides translations for all template variables and labels in English `en`, French `fr`, German `de`, Spanish `es`, Italian `it`, Danish `da`, Polish `pl`, Norwegian -`no`, Swedish `sv`, Korean `kr`, Chinese (Simplified) `zh` and Chinese -(Traditional) `zh-Hant`. Specify the language with: +`no`, Swedish `sv`, Korean `kr`, Russian `ru`, Chinese (Simplified) `zh` and +Chinese (Traditional) `zh-Hant`. Specify the language with: ``` yaml theme: @@ -305,6 +315,8 @@ Pull Request. #### Site search +> Default: `en` + Site search is implemented using [lunr.js][17], which includes stemmers for the English language by default, while stemmers for other languages are included with [lunr-languages][18], both of which are integrated with this theme. Support @@ -345,6 +357,8 @@ extra: ### Favicon +> Default: `assets/images/favicon.png` + The default favicon can be changed by setting the `favicon` variable to an `.ico` or image file: @@ -357,6 +371,8 @@ theme: #### Tabs +> Default: `false` + Material supports another layer on top of the main navigation for larger screens in the form of tabs. This is especially useful for larger documentation projects with only few top-level sections. Tabs can be enabled by setting the @@ -472,9 +488,9 @@ automatically included. ## Migration -### From 1.x to 2.0 +### From 1.x to 2.x -* Material for MkDocs 2.0 requires MkDocs 0.17.1, as this version introduced +* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced changes to the way themes can define options. The following variables inside your project's `mkdocs.yml` need to be renamed: @@ -483,6 +499,9 @@ automatically included. * `extra.font` becomes `theme.font` * `extra.logo` becomes `theme.logo` +* Favicon support has been dropped by MkDocs, it must now be defines in + `theme.favicon` (previously `site_favicon`). + * Localization is now separate in theme language and search language. While there can only be a single language on theme-level, the search supports multiple languages which can be separated by commas. diff --git a/material/mkdocs_theme.yml b/material/mkdocs_theme.yml index 0c2d57231..ee2605c9c 100644 --- a/material/mkdocs_theme.yml +++ b/material/mkdocs_theme.yml @@ -41,7 +41,7 @@ favicon: assets/images/favicon.png # The logo of the documentation shown in the header and navigation can either # be a Material Icon ligature or an image URL logo: - icon: school + icon: "\uE80C" # Material includes the search in the header as a partial, not as a separate # template, so it's correct that search.html is missing include_search_page: false diff --git a/material/partials/language/ru.html b/material/partials/language/ru.html new file mode 100644 index 000000000..d762438bb --- /dev/null +++ b/material/partials/language/ru.html @@ -0,0 +1,18 @@ +{% macro t(key) %}{{ { + "language": "ru", + "clipboard.copy": "Копировать в буфер", + "clipboard.copied": "Скопировано в буфер", + "edit.link.title": "Редактировать страницу", + "footer.previous": "Назад", + "footer.next": "Вперед", + "meta.comments": "Комментарии", + "meta.source": "Исходный код", + "search.placeholder": "Поиск", + "search.result.placeholder": "Начните печатать для поиска", + "search.result.none": "Совпадений не найдено", + "search.result.one": "Найдено 1 совпадение", + "search.result.other": "Найдено # совпадений", + "search.tokenizer": "[\s\-]+", + "source.link.title": "Перейти к репозиторию", + "toc.title": "Содержание" +}[key] }}{% endmacro %} diff --git a/mkdocs.yml b/mkdocs.yml index b95c2761e..79844274f 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -53,7 +53,7 @@ theme: code: Roboto Mono favicon: assets/images/favicon.png logo: - icon: school + icon: "\uE80C" # Options extra: diff --git a/src/mkdocs_theme.yml b/src/mkdocs_theme.yml index f337cf822..3854b3964 100644 --- a/src/mkdocs_theme.yml +++ b/src/mkdocs_theme.yml @@ -55,7 +55,7 @@ favicon: assets/images/favicon.png # The logo of the documentation shown in the header and navigation can either # be a Material Icon ligature or an image URL logo: - icon: school + icon: "\uE80C" # Material includes the search in the header as a partial, not as a separate # template, so it's correct that search.html is missing diff --git a/src/partials/language/ru.html b/src/partials/language/ru.html new file mode 100644 index 000000000..15410ca4f --- /dev/null +++ b/src/partials/language/ru.html @@ -0,0 +1,41 @@ + + + +{% macro t(key) %}{{ { + "language": "ru", + "clipboard.copy": "Копировать в буфер", + "clipboard.copied": "Скопировано в буфер", + "edit.link.title": "Редактировать страницу", + "footer.previous": "Назад", + "footer.next": "Вперед", + "meta.comments": "Комментарии", + "meta.source": "Исходный код", + "search.placeholder": "Поиск", + "search.result.placeholder": "Начните печатать для поиска", + "search.result.none": "Совпадений не найдено", + "search.result.one": "Найдено 1 совпадение", + "search.result.other": "Найдено # совпадений", + "search.tokenizer": "[\s\-]+", + "source.link.title": "Перейти к репозиторию", + "toc.title": "Содержание" +}[key] }}{% endmacro %}