mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	head: add support for Canonical URLs
cc: #104 usage => in site config.yml (used for home page only) => canonical: ["https://www.example.com" , "https://blog.example.com"] in per-page vars => canonical: ["https://www.example.com/page1" , "https://blog.example.com/pages/page1"]
This commit is contained in:
		| @@ -17,6 +17,10 @@ | |||||||
|     {{- 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="{{ .Permalink }}" /> | ||||||
|  | {{- $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}} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange