Skip to content

Commit 43a7be6

Browse files
author
Tim Bannister
committed
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.
1 parent 1addb85 commit 43a7be6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

layouts/blog/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
{{ partial "head.html" . }}
55
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
66
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
7+
{{ with .Params.canonicalUrl }}
8+
<link rel="canonical" href="{{ . }}">
9+
{{ end }}
710
</head>
811
<body class="td-{{ .Kind }} td-blog">
912
<header>

0 commit comments

Comments
 (0)