-
+ +
+
{% block site_nav %} ``` The `lunr-language`-related JavaScript like stemmers and segmenters are now loaded explicitly by the search worker. The main application is now called `bundle.min.js`. ``` diff {% block scripts %} + - - - - {% if lang.t("search.language") != "en" %} - {% set languages = lang.t("search.language").split(",") %} - {% if languages | length and languages[0] != "" %} - {% set path = "assets/javascripts/lunr/" %} - - {% for language in languages | map("trim") %} - {% if language != "en" %} - {% if language == "ja" %} - - {% endif %} - {% if language in ($md-lunr-languages$) %} - - {% endif %} - {% endif %} - {% endfor %} - {% if languages | length > 1 %} - - {% endif %} - {% endif %} - {% endif %} + + ``` #### `src/partials/header.html` The header `data-md-component` attribute values have been renamed and prefixed with `header-` in order to better reflect that they belong to the header. ``` diff
{% if config.site_name == page.title %} {{ config.site_name }} {% else %} ``` #### `src/partials/language.html` The options exposed through `config.extra.search` are now available through the default search plugin integration and have been removed from the template. ``` diff {% macro t(key) %}{{ { - "direction": config.theme.direction, - "search.language": ( - config.extra.search | default({}) - ).language, - "search.tokenizer": ( - config.extra.search | default({}) - ).tokenizer | default("", true), + "direction": config.theme.direction }[key] or lang.t(key) or fallback.t(key) }}{% endmacro %} ``` #### `src/partials/search.html` The search `data-md-component` attribute values have been renamed and prefixed with `search-` in order to better reflect that they belong to the search. ``` diff autocorrect="off" autocomplete="off" spellcheck="false" - data-md-component="query" + data-md-component="search-query" data-md-state="active" />
-
+
{{ lang.t("search.result.placeholder") }}
``` #### `src/partials/social.html` Social icons are implemented by inlining FontAwesome's original SVGs. Thus, the icon font was removed and the `type` member was renamed to `icon` as part of the `config.extra.social` configuration option in `mkdocs.yml`. ``` diff {% if config.extra.social %} {% endif %} ``` #### `src/partials/source.html` The buildtime platform detection was removed and is now carried out during runtime initialization. The repository icon now supports the entire FontAwesome iconset by setting `config.extra.repo_icon` to a valid FontAwesome icon. ``` diff - -{% set platform = config.extra.repo_icon or config.repo_url %} -{% if "github" in platform %} - {% set repo_type = "github" %} -{% elif "gitlab" in platform %} - {% set repo_type = "gitlab" %} -{% elif "bitbucket" in platform %} - {% set repo_type = "bitbucket" %} -{% else %} - {% set repo_type = "" %} -{% endif %} - - {% if repo_type %} -
- - - -
- {% endif %} +
+ {% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %} + {% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %} +
{{ config.repo_name }}
```