Skip to content

Commit

Permalink
Prefer site.tagline for site subtitle if defined.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
olifre committed Jan 9, 2022
1 parent c7f251e commit 7913202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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:
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<section>
<div id="title">
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>
<p>{{ site.tagline | default: site.description | default: site.github.project_tagline }}</p>
<hr>
<span class="credits left">Project maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></span>
<span class="credits right">Hosted on GitHub Pages &mdash; Theme by <a href="https://twitter.com/mattgraham">mattgraham</a></span>
Expand Down

0 comments on commit 7913202

Please sign in to comment.