{{- $canonical := .Permalink -}}
{{- with .Site.Params.site.canonical -}}
{{- $canonical = print $.Site.Params.site.canonical $.RelPermalink -}}
{{- end -}}
{{- with .Params.feed -}}
{{- $canonical = $.Params.feed.link -}}
{{- end -}}
{{- with .Params.canonical -}}
{{- $canonical = $.Params.canonical -}}
{{- end -}}