Skip to content

Commit

Permalink
add support for unique page titles
Browse files Browse the repository at this point in the history
partly addresses #357 with updates needed to pages sitewide to use implement title: within the frontmatter for every page where it is currently missing
  • Loading branch information
iamjolly committed Jul 24, 2020
1 parent dad354f commit deb8b2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: GSA Centers of Excellence
title: GSA - IT Modernization Centers of Excellence
email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
The Centers of Excellence (CoE) are accelerating the modernization of IT
Expand Down
11 changes: 10 additions & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{site.baseurl}}/icons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>GSA - IT Modernization Centers of Excellence</title>
<!-- Title -->
{% if page.title %}
<title>{{ page.title }} | {{ site.title }}</title>
<meta property="og:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="twitter:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}">
{% else %}
<title>{{ site.title }} | {{ site.description }}</title>
<meta property="og:title" content="{{ site.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta property="twitter:title" content="{{ site.title | xml_escape }} | {{ site.title | xml_escape }}" />
{% endif %}

{% assign description = page.description | default: site.description %}
{% if description %}
Expand Down

0 comments on commit deb8b2a

Please sign in to comment.