Added title.html.twig

This commit is contained in:
Oliver Davies 2015-04-12 20:15:50 +01:00
parent aa5b836fa8
commit 4df296bfbf
2 changed files with 19 additions and 2 deletions

View file

@ -9,8 +9,7 @@
{% endif %}
{% if page.meta.og %}{% include "og" with {og: page.meta.og} %}{% endif %}
<link rel="author" href="{{ site.url }}/humans.txt" />
<title>{% if (page.front == true) and (site.subtitle) %}{{ site.subtitle }}{% else %}{{ page.title }}{% endif %} | {{ site.title }}</title>
{% include 'title' %}
<link rel="stylesheet" href="{{ site.url }}/{{ theme_path('assets/css/styles.css') }}">
{% block styles %}{% endblock %}
</head>

View file

@ -0,0 +1,18 @@
{% set separator = '-' %}
{% spaceless %}<title>
{% if page.full_title %}
{{ page.full_title }}
{% elseif page.title %}
{% if site.title %}
{{ page.title }} {{ separator }} {{ site.title }}
{% elseif page.subtitle %}
{{ page.title }} {{ separator }} {{ site.title }} {{ separator }} {{ site.subtitle }}
{% endif %}
{% elseif site.title %}
{% if site.subtitle %}
{{ site.title }} {{ separator }} {{ site.subtitle }}
{% else %}
{{ site.title }}
{% endif %}
{% endif %}
</title>{% endspaceless %}