feat: add option to set a custom canonical url (#1267)
* add option to set a custom canonical url * style: use `with` to load cannonicalurl * style: change to canonicalUrl Frontmatter is case-insensitive so it does not matter --------- Co-authored-by: FarisZR <35614734+FarisZR@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,11 @@
|
|||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partial "data/title" . -}}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
<link rel='canonical' href='{{ .Permalink }}'>
|
{{ with .Params.canonicalUrl }}
|
||||||
|
<link rel="canonical" href="{{ . }}">
|
||||||
|
{{ else }}
|
||||||
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- partial "head/custom-font.html" . -}}
|
{{- partial "head/custom-font.html" . -}}
|
||||||
{{- partial "head/style.html" . -}}
|
{{- partial "head/style.html" . -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user