head: Fix user defining canonical URL resulting in multiple canonical URLs (#133)
* Revert "head: add support for Canonical URLs"
This reverts commit 8af7c551ff
.
* Allow user to specify single canonical URL
This commit is contained in:
parent
77ff1e6b45
commit
2abc278c69
|
@ -16,11 +16,7 @@
|
||||||
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
||||||
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
||||||
<meta name="author" content="{{ (partial "author.html" . ) }}">
|
<meta name="author" content="{{ (partial "author.html" . ) }}">
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ .Params.canonicalURL }} {{- else -}} {{ .Permalink }} {{- end }}" />
|
||||||
{{- $canonical := cond (.IsHome) .Site.Params.canonical .Params.canonical }}
|
|
||||||
{{- range $canonical }}
|
|
||||||
<link rel="canonical" href="{{ trim . " " }}" />
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
||||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
|
Loading…
Reference in New Issue