From a9c6ab5476c0241ca9b3909283a09cfcd78f1685 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Tue, 20 Jul 2021 09:34:31 +0200 Subject: [PATCH] Prefer site.tagline for site subtitle if defined. Search engines expect slightly more context than the page subtitle provides. Following the definition in jekyll-seo-tag, the tagline is used as subtitle if set, while the description is exposed in the meta tag. --- README.md | 3 ++- _layouts/default.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cd7b57f..c91cd505 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ Midnight will respect the following variables, if set in your site's `_config.ym ```yml title: [The title of your site] -description: [A short description of your site's purpose] +tagline: [A very short description of your site's purpose, used as subtitle] +description: [A short description of your site's purpose (e.g. for search engines)] ``` Additionally, you may choose to set the following optional variables: diff --git a/_layouts/default.html b/_layouts/default.html index 08e68a2b..082e72cb 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -36,7 +36,7 @@

{{ site.title | default: site.github.repository_name }}

-

{{ site.description | default: site.github.project_tagline }}

+

{{ site.tagline | default: site.description | default: site.github.project_tagline }}


Project maintained by {{ site.github.owner_name }} Hosted on GitHub Pages — Theme by mattgraham