Skip to content

Commit

Permalink
Add {% title %}
Browse files Browse the repository at this point in the history
Closes #114
  • Loading branch information
Henn Runnel committed Jul 25, 2019
1 parent 4d090c0 commit 543f2ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/html-head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
<script src="{{ javascripts_path }}/modernizr-custom.min.js"></script>

{% comment %}SITE TITLE{% endcomment %}
{% capture page_title %}{% if article %}{{ article.title }}{% unless page.site_title == "" %}{{ page.site_title }}{% endunless %}{% else %}{% if site.root_item.selected? and page.site_title != "" %}{{ page.site_title }}{% else %}{{ page.title }}{% unless page.site_title == "" %}{{ page.site_title }}{% endunless %}{% endif %}{% endif %}{% endcapture %}
<title>{{ page_title }}</title>
<title>{% title %}</title>

{% include "template-meta" %}

Expand Down
2 changes: 1 addition & 1 deletion components/template-meta.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if site.data.fb_admin %}<meta property="fb:admins" content="{{ site.data.fb_admin }}">{% endif %}
<meta property="og:type" content="{% if article %}article{% else %}website{% endif %}">
<meta property="og:url" content="{{ site.url }}{% if article %}{{ article.url | remove_first:'/' }}{% else %}{{ page.url | remove_first:'/' }}{% endif %}">
<meta property="og:title" content="{{ page_title | escape }}">
<meta property="og:title" content="{% title %}">
<meta property="og:site_name" content="{{ page.site_title | escape }}">

{% comment %}Open Graph image{% endcomment %}
Expand Down

0 comments on commit 543f2ab

Please sign in to comment.