mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 10:31:39 +01:00
head: update description and keywords logic
This commit is contained in:
parent
353146891e
commit
7db1be3d73
@ -4,13 +4,12 @@
|
|||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
|
<title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
|
||||||
<!-- Meta -->
|
<!-- Meta -->
|
||||||
{{- if in site.Params.mainSections .Type }}
|
<meta name="keywords" content="{{ if .Params.keywords -}}
|
||||||
<meta name="description" content="{{ .Summary }}">
|
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
|
||||||
<meta name="keywords" content={{ delimit .Keywords ", " }} />
|
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" />
|
||||||
{{- else }}
|
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
|
||||||
<meta name="description"
|
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
||||||
content="{{if .IsHome}}{{ .Site.Params.description }}{{else}}{{ .Title }} - {{ .Site.Title }}{{end}}">
|
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
||||||
{{- end }}
|
|
||||||
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
||||||
|
Loading…
Reference in New Issue
Block a user