mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed site title behavior when using front matter
This commit is contained in:
parent
af4f74b368
commit
1ec08b42dd
@ -1,6 +1,6 @@
|
||||
---
|
||||
template: overrides/main.html
|
||||
title: Getting started - Material for MkDocs
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
# Getting started
|
||||
|
@ -45,9 +45,8 @@ title: Lorem ipsum dolor sit amet
|
||||
```
|
||||
|
||||
This will set the `title` tag inside the document `head` for the current page
|
||||
to the provided value. It will also override the default behavior of Material
|
||||
for MkDocs which appends the site title using a dash as a separator to the page
|
||||
title.
|
||||
to the provided value. Note that the site title is appended using a dash as a
|
||||
separator, which is the default behavior.
|
||||
|
||||
[5]: #metadata
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
{% endblock %}
|
||||
{% block htmltitle %}
|
||||
{% if page and page.meta and page.meta.title %}
|
||||
<title>{{ page.meta.title }}</title>
|
||||
<title>{{ page.meta.title }} - {{ config.site_name }}</title>
|
||||
{% elif page and page.title and not page.is_homepage %}
|
||||
<title>{{ page.title | striptags }} - {{ config.site_name }}</title>
|
||||
{% else %}
|
||||
|
@ -80,7 +80,7 @@
|
||||
<!-- Site title -->
|
||||
{% block htmltitle %}
|
||||
{% if page and page.meta and page.meta.title %}
|
||||
<title>{{ page.meta.title }}</title>
|
||||
<title>{{ page.meta.title }} - {{ config.site_name }}</title>
|
||||
{% elif page and page.title and not page.is_homepage %}
|
||||
<title>{{ page.title | striptags }} - {{ config.site_name }}</title>
|
||||
{% else %}
|
||||
|
Loading…
Reference in New Issue
Block a user