1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Fixed meta title and description only rendering first character

This commit is contained in:
squidfunk 2017-11-01 11:48:44 +01:00 committed by Martin Donath
parent eb232d43f0
commit 72121517e6
3 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
mkdocs-material-2.x.x (2017-xx-xx)
* Fixed #553: meta title and description only renders first character
mkdocs-material-2.0.1 (2017-10-31) mkdocs-material-2.0.1 (2017-10-31)
* Fixed error when initializing search * Fixed error when initializing search

View File

@ -10,7 +10,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
{% if page and page.meta.description %} {% if page and page.meta.description %}
<meta name="description" content="{{ page.meta.description | first }}"> <meta name="description" content="{{ page.meta.description }}">
{% elif config.site_description %} {% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}"> <meta name="description" content="{{ config.site_description }}">
{% endif %} {% endif %}
@ -42,7 +42,7 @@
{% endblock %} {% endblock %}
{% block htmltitle %} {% block htmltitle %}
{% if page and page.meta.title %} {% if page and page.meta.title %}
<title>{{ page.meta.title | first }}</title> <title>{{ page.meta.title }}</title>
{% elif page and page.title and not page.is_homepage %} {% elif page and page.title and not page.is_homepage %}
<title>{{ page.title }} - {{ config.site_name }}</title> <title>{{ page.title }} - {{ config.site_name }}</title>
{% else %} {% else %}

View File

@ -42,7 +42,7 @@
<!-- Page description --> <!-- Page description -->
{% if page and page.meta.description %} {% if page and page.meta.description %}
<meta name="description" <meta name="description"
content="{{ page.meta.description | first }}" /> content="{{ page.meta.description }}" />
{% elif config.site_description %} {% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}" /> <meta name="description" content="{{ config.site_description }}" />
{% endif %} {% endif %}
@ -89,7 +89,7 @@
<!-- Site title --> <!-- Site title -->
{% block htmltitle %} {% block htmltitle %}
{% if page and page.meta.title %} {% if page and page.meta.title %}
<title>{{ page.meta.title | first }}</title> <title>{{ page.meta.title }}</title>
{% elif page and page.title and not page.is_homepage %} {% elif page and page.title and not page.is_homepage %}
<title>{{ page.title }} - {{ config.site_name }}</title> <title>{{ page.title }} - {{ config.site_name }}</title>
{% else %} {% else %}