diff --git a/CHANGELOG b/CHANGELOG index 7e5eb32e5..c8f20228e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ mkdocs-material-2.x.x (2017-xx-xx) * Fixed #553: meta title and description only renders first character + * Fixed favicon regression caused by deprecation upstream mkdocs-material-2.0.1 (2017-10-31) diff --git a/docs/getting-started.md b/docs/getting-started.md index fb8993d7e..a66448bbe 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -343,6 +343,16 @@ extra: [17]: https://lunrjs.com [18]: https://github.com/MihaiValentin/lunr-languages +### Favicon + +The default favicon can be changed by setting the `favicon` variable to an +`.ico` or image file: + +``` yaml +theme: + favicon: 'images/favicon.ico' +``` + ### Features #### Tabs @@ -360,15 +370,6 @@ theme: ## Customization -### Adding a favicon - -A favicon can be added by setting the `site_favicon` variable to an `.ico` or -image file: - -``` yaml -site_favicon: 'images/favicon.ico' -``` - ### Adding a source repository To include a link to the repository of your project within your documentation, diff --git a/material/base.html b/material/base.html index 52658d53d..708fb2bf6 100644 --- a/material/base.html +++ b/material/base.html @@ -33,11 +33,7 @@ ] %} {% endfor %} - {% if config.site_favicon %} - - {% else %} - - {% endif %} + {% endblock %} {% block htmltitle %} diff --git a/material/mkdocs_theme.yml b/material/mkdocs_theme.yml index fac03dd3f..0c2d57231 100644 --- a/material/mkdocs_theme.yml +++ b/material/mkdocs_theme.yml @@ -36,6 +36,8 @@ font: text: Roboto # Fixed-width font for code listings code: Roboto Mono +# Favicon to be rendered +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: diff --git a/mkdocs.yml b/mkdocs.yml index 2dd612608..b95c2761e 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -51,6 +51,7 @@ theme: font: text: Roboto code: Roboto Mono + favicon: assets/images/favicon.png logo: icon: school diff --git a/src/base.html b/src/base.html index f0c747293..8516e386b 100644 --- a/src/base.html +++ b/src/base.html @@ -73,13 +73,8 @@ {% endfor %} - {% if config.site_favicon %} - - {% else %} - - {% endif %} +