Skip to content

Commit 0174467

Browse files
committed
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.
1 parent e2bdf76 commit 0174467

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ Midnight will respect the following variables, if set in your site's `_config.ym
3232

3333
```yml
3434
title: [The title of your site]
35-
description: [A short description of your site's purpose]
35+
tagline: [A very short description of your site's purpose, used as subtitle]
36+
description: [A short description of your site's purpose (e.g. for search engines)]
3637
```
3738

3839
Additionally, you may choose to set the following optional variables:

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<section>
3737
<div id="title">
3838
<h1>{{ site.title | default: site.github.repository_name }}</h1>
39-
<p>{{ site.description | default: site.github.project_tagline }}</p>
39+
<p>{{ site.tagline | default: site.description | default: site.github.project_tagline }}</p>
4040
<hr>
4141
<span class="credits left">Project maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></span>
4242
<span class="credits right">Hosted on GitHub Pages &mdash; Theme by <a href="https://twitter.com/mattgraham">mattgraham</a></span>

0 commit comments

Comments
 (0)