mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-02-06 11:53:31 +08:00
add option to set a custom canonical url
This commit is contained in:
parent
aae9cf67db
commit
bf874c32d1
@ -8,7 +8,11 @@
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<link rel='canonical' href='{{ .Permalink }}'>
|
||||
{{ if .Params.canonicalurl }}
|
||||
<link rel="canonical" href="{{ .Params.canonicalurl }}">
|
||||
{{ else }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
{{- partial "head/style.html" . -}}
|
||||
{{- partial "head/script.html" . -}}
|
||||
|
Loading…
Reference in New Issue
Block a user