Commit 6a6dfef7 authored by Jamie Tanna's avatar Jamie Tanna

Add `rel=canonical` if we don't override in a post

If we've not overridden the canonical URL in our posts, we should set
the canonical URL to be the post's full live URL, as that's the actual
canonical URL!

As part of jvt.me#425.
parent 1019a3d7
......@@ -41,6 +41,8 @@
{{- if .Params.Canonical_Url }}
<link rel="canonical" href="{{ .Params.Canonical_Url }}" />
{{ else }}
<link rel="canonical" href="{{ .Site.Params.LiveSiteUrl }}{{ .URL }}" />
{{- end }}
{{- if .Params.Tags }}
<meta name="keywords" content="{{ delimit .Params.Tags ", " }}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment