From 6608f3a439e96349fd9b9b111c8c232393656f42 Mon Sep 17 00:00:00 2001 From: Writeup Date: Fri, 6 Nov 2020 04:07:35 +0800 Subject: [PATCH] Added support for meta keywords (#2029) * Update mkdocs.yml * Update base.html --- mkdocs.yml | 1 + src/base.html | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 21d5764b5..d3a3e8d7b 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,6 +22,7 @@ site_name: Material for MkDocs site_url: https://squidfunk.github.io/mkdocs-material/ site_author: Martin Donath +site_keywords: Material,MkDocs site_description: >- Create a branded static site from a set of Markdown files to host the documentation of your Open Source or commercial project – customizable, diff --git a/src/base.html b/src/base.html index 2020fce67..16c3af13c 100644 --- a/src/base.html +++ b/src/base.html @@ -31,6 +31,13 @@ + + {% if page and page.meta and page.meta.keywords %} + + {% elif config.site_keywords %} + + {% endif %} + {% if page and page.meta and page.meta.description %}