Skip to content

Commit

Permalink
If a blog article has a canonical URI set, link to it
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sftim committed Oct 1, 2020
1 parent 1addb85 commit 43a7be6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layouts/blog/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 43a7be6

Please sign in to comment.