summaryrefslogtreecommitdiffstats
path: root/blog/_includes/head.html
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-08-24 20:48:35 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-08-24 20:48:35 +0200
commitea47219a2894d4fb304ae35e66b56e5e0e6e3827 (patch)
tree0e0855574748d34bcf811f38442b6998d393ae12 /blog/_includes/head.html
parent56eeb72ac5b71e70d2e14ae7b2fe620ab5e43441 (diff)
downloadnorsk-urskog-main-ea47219a2894d4fb304ae35e66b56e5e0e6e3827.tar.gz
norsk-urskog-main-ea47219a2894d4fb304ae35e66b56e5e0e6e3827.tar.bz2
norsk-urskog-main-ea47219a2894d4fb304ae35e66b56e5e0e6e3827.zip
Add new tag page_title to retreive translated page title if available.
If no translation exist, use default translation, and if no default translation, use the key unmodified. This makes the titles for posts work as expected.
Diffstat (limited to 'blog/_includes/head.html')
-rw-r--r--blog/_includes/head.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/blog/_includes/head.html b/blog/_includes/head.html
index 4a7c430..93f1512 100644
--- a/blog/_includes/head.html
+++ b/blog/_includes/head.html
@@ -2,7 +2,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>{{ site.title }}{% if page.title %} - {% t page.title %}{% endif %}</title>
+ <title>
+ {{ site.title }}
+ {% if page.title %}
+ - {% page_title page.title %}
+ {% endif %}
+ </title>
<meta name="description" content="{{ site.description }}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl_root }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl_root | prepend: site.url }}">