Skip to content

Commit

Permalink
[CI] Ensure that every page has a canonical link (open-telemetry#4492)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored May 15, 2024
1 parent 269c3b3 commit fdd8422
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{{ with .Params.canonical_url -}}

<link rel="canonical" href="{{ . }}">
{{ end -}}

{{- else -}}

{{ $canonicalURL := .Permalink -}}

<link rel="canonical" href="{{ $canonicalURL }}">

{{- end -}}

0 comments on commit fdd8422

Please sign in to comment.