mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
add option to set a custom canonical url
This commit is contained in:
parent
aae9cf67db
commit
bf874c32d1
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue