Adding default title tag

Currently, if page.collectionpage and page.title are both unset, the page title is set to " - Whatever Blog Title". This is undesirable, so if neither variable is set, the title tag should just be "Whatever Blog Title".
This commit is contained in:
Michael Lynch 2019-03-03 16:20:09 -05:00
parent 8e9aa160e9
commit 060bc4149a

View File

@ -5,8 +5,10 @@
{% if page.collectionpage %} {% if page.collectionpage %}
{% assign collectiondata = site.collections | where: "label", page.collectionpage | first %} {% assign collectiondata = site.collections | where: "label", page.collectionpage | first %}
<title>{{ collectiondata.title }} - {{ site.title }}</title> <title>{{ collectiondata.title }} - {{ site.title }}</title>
{% else %} {% elsif page.title %}
<title>{{ page.title }} - {{ site.title }}</title> <title>{{ page.title }} - {{ site.title }}</title>
{% else %}
<title>{{ site.title }}</title>
{% endif %} {% endif %}
<link rel="stylesheet" href="{{ "/assets/styles.css" | relative_url }}"> <link rel="stylesheet" href="{{ "/assets/styles.css" | relative_url }}">