Fix trailing slash on canonical URL

This commit is contained in:
Oliver Davies 2018-09-10 20:21:26 +01:00
parent 40685312fa
commit 46e4a65c7f

View file

@ -1,7 +1,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
<link rel="canonical" href="{{ site.url }}{{ page.url == '//' ? '' : page.url }}" />
{% if page.meta.description %}
<meta name="description" content="{{ page.meta.description|e('html') }}">