Skip to content

Commit

Permalink
Merge pull request #1266 from greenpeace/split-title
Browse files Browse the repository at this point in the history
Split title into a new template block
  • Loading branch information
comzeradd authored Dec 17, 2020
2 parents c9033a8 + c1f68f7 commit 9187130
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions templates/blocks/title.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<title>
{% if post.password_required %}
{{ site.name }}
{% set post_tags = '' %}
{% elseif wp_title %}
{{ wp_title|e('esc_html')|raw }} - {{ site.name }}
{% else %}
{{ site.name }}
{% endif %}
</title>
11 changes: 1 addition & 10 deletions templates/html-header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
<html {{ fn('language_attributes', 'html') }}>
<head>
<meta charset="{{ site.charset }}">
<title>
{% if post.password_required %}
{{ site.name }}
{% set post_tags = '' %}
{% elseif wp_title %}
{{ wp_title|e('esc_html')|raw }} - {{ site.name }}
{% else %}
{{ site.name }}
{% endif %}
</title>
{% include 'blocks/title.twig' %}

{% include 'blocks/meta_fields.twig' %}

Expand Down

0 comments on commit 9187130

Please sign in to comment.