If a blog article has a canonical URI set, link to it

This change lets us point search engines to the original article when we
mirror them from https://k8s.dev/ and potentially from other sites too.
pull/24333/head
Tim Bannister 2020-10-01 17:47:45 +01:00
parent 1addb85433
commit 43a7be6495
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@
{{ partial "head.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
{{ with .Params.canonicalUrl }}
<link rel="canonical" href="{{ . }}">
{{ end }}
</head>
<body class="td-{{ .Kind }} td-blog">
<header>