Skip to content

Commit 3ad20ae

Browse files
authored
Allow specifying a canonical page URL (#631)
1 parent 04bcafd commit 3ad20ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

layouts/_default/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<head>
44
{{ print "<!-- Generated " (time.Now.UTC.Format "2006-01-02 15:04:05 UTC") " -->" | safeHTML }}
55
{{ partial "meta.html" . }}
6+
{{ with .Params.canonicalURL -}}
7+
<link rel="canonical" href="{{ . }}">
8+
{{- end }}
69
<title>{{ block "title" . }}{{ .Site.Title }}{{ if not (eq .Site.Title .Title) }} - {{ .Title }}{{end}}{{ end }}</title>
710

811
<!-- Render theme css -->

0 commit comments

Comments
 (0)