Fixed favicon regression caused by deprecation upstream

This commit is contained in:
squidfunk 2017-11-01 12:04:22 +01:00 committed by Martin Donath
parent 72121517e6
commit f4dddaeeee
7 changed files with 20 additions and 21 deletions

View File

@ -1,6 +1,7 @@
mkdocs-material-2.x.x (2017-xx-xx) mkdocs-material-2.x.x (2017-xx-xx)
* Fixed #553: meta title and description only renders first character * 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) mkdocs-material-2.0.1 (2017-10-31)

View File

@ -343,6 +343,16 @@ extra:
[17]: https://lunrjs.com [17]: https://lunrjs.com
[18]: https://github.com/MihaiValentin/lunr-languages [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 ### Features
#### Tabs #### Tabs
@ -360,15 +370,6 @@ theme:
## Customization ## 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 ### Adding a source repository
To include a link to the repository of your project within your documentation, To include a link to the repository of your project within your documentation,

View File

@ -33,11 +33,7 @@
] %} ] %}
<meta name="lang:{{ key }}" content="{{ lang.t(key) }}"> <meta name="lang:{{ key }}" content="{{ lang.t(key) }}">
{% endfor %} {% endfor %}
{% if config.site_favicon %} <link rel="shortcut icon" href="{{ base_url }}/{{ config.theme.favicon }}">
<link rel="shortcut icon" href="{{ base_url }}/{{ config.site_favicon }}">
{% else %}
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.png">
{% endif %}
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-2.0.1"> <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-2.0.1">
{% endblock %} {% endblock %}
{% block htmltitle %} {% block htmltitle %}

View File

@ -36,6 +36,8 @@ font:
text: Roboto text: Roboto
# Fixed-width font for code listings # Fixed-width font for code listings
code: Roboto Mono 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 # The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature or an image URL # be a Material Icon ligature or an image URL
logo: logo:

View File

@ -51,6 +51,7 @@ theme:
font: font:
text: Roboto text: Roboto
code: Roboto Mono code: Roboto Mono
favicon: assets/images/favicon.png
logo: logo:
icon: school icon: school

View File

@ -73,13 +73,8 @@
{% endfor %} {% endfor %}
<!-- Favicon --> <!-- Favicon -->
{% if config.site_favicon %} <link rel="shortcut icon"
<link rel="shortcut icon" href="{{ base_url }}/{{ config.theme.favicon }}">
href="{{ base_url }}/{{ config.site_favicon }}">
{% else %}
<link rel="shortcut icon"
href="{{ base_url }}/assets/images/favicon.png">
{% endif %}
<!-- Generator banner --> <!-- Generator banner -->
<meta name="generator" <meta name="generator"

View File

@ -49,6 +49,9 @@ font:
# Fixed-width font for code listings # Fixed-width font for code listings
code: Roboto Mono 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 # The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature or an image URL # be a Material Icon ligature or an image URL
logo: logo: