Skip to content

Commit fdd8422

Browse files
authored
[CI] Ensure that every page has a canonical link (#4492)
1 parent 269c3b3 commit fdd8422

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

layouts/partials/hooks/head-end.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{{ with .Params.canonical_url -}}
2+
23
<link rel="canonical" href="{{ . }}">
3-
{{ end -}}
4+
5+
{{- else -}}
6+
7+
{{ $canonicalURL := .Permalink -}}
8+
9+
<link rel="canonical" href="{{ $canonicalURL }}">
10+
11+
{{- end -}}

0 commit comments

Comments
 (0)