mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added support for meta keywords
This commit is contained in:
parent
6608f3a439
commit
72494f08bb
@ -13,6 +13,11 @@
|
|||||||
{% elif config.site_description %}
|
{% elif config.site_description %}
|
||||||
<meta name="description" content="{{ config.site_description }}">
|
<meta name="description" content="{{ config.site_description }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if page and page.meta and page.meta.keywords %}
|
||||||
|
<meta name="keywords" content="{{ page.meta.keywords }}">
|
||||||
|
{% elif config.site_keywords %}
|
||||||
|
<meta name="keywords" content="{{ config.site_keywords }}">
|
||||||
|
{% endif %}
|
||||||
{% if page.canonical_url %}
|
{% if page.canonical_url %}
|
||||||
<link rel="canonical" href="{{ page.canonical_url }}">
|
<link rel="canonical" href="{{ page.canonical_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
site_name: Material for MkDocs
|
site_name: Material for MkDocs
|
||||||
site_url: https://squidfunk.github.io/mkdocs-material/
|
site_url: https://squidfunk.github.io/mkdocs-material/
|
||||||
site_author: Martin Donath
|
site_author: Martin Donath
|
||||||
site_keywords: Material,MkDocs
|
|
||||||
site_description: >-
|
site_description: >-
|
||||||
Create a branded static site from a set of Markdown files to host the
|
Create a branded static site from a set of Markdown files to host the
|
||||||
documentation of your Open Source or commercial project – customizable,
|
documentation of your Open Source or commercial project – customizable,
|
||||||
|
@ -31,13 +31,6 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
|
||||||
<!-- Page keywords -->
|
|
||||||
{% if page and page.meta and page.meta.keywords %}
|
|
||||||
<meta name="keywords" content="{{ page.meta.keywords }}" />
|
|
||||||
{% elif config.site_keywords %}
|
|
||||||
<meta name="keywords" content="{{ config.site_keywords }}" />
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- Page description -->
|
<!-- Page description -->
|
||||||
{% if page and page.meta and page.meta.description %}
|
{% if page and page.meta and page.meta.description %}
|
||||||
<meta name="description" content="{{ page.meta.description }}" />
|
<meta name="description" content="{{ page.meta.description }}" />
|
||||||
@ -45,6 +38,13 @@
|
|||||||
<meta name="description" content="{{ config.site_description }}" />
|
<meta name="description" content="{{ config.site_description }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Page keywords -->
|
||||||
|
{% if page and page.meta and page.meta.keywords %}
|
||||||
|
<meta name="keywords" content="{{ page.meta.keywords }}" />
|
||||||
|
{% elif config.site_keywords %}
|
||||||
|
<meta name="keywords" content="{{ config.site_keywords }}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Canonical -->
|
<!-- Canonical -->
|
||||||
{% if page.canonical_url %}
|
{% if page.canonical_url %}
|
||||||
<link rel="canonical" href="{{ page.canonical_url }}" />
|
<link rel="canonical" href="{{ page.canonical_url }}" />
|
||||||
|
Loading…
Reference in New Issue
Block a user