diff options
| -rw-r--r-- | layouts/partials/head.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e379533..3713b96 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,9 +11,13 @@ <title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title> {{- /* Meta */}} +{{- if .IsHome }} +{{ with .Site.Params.keywords -}}<meta name="keywords" content="{{- range $i, $e := . }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}" />{{ end }} +{{- else }} <meta name="keywords" content="{{ if .Params.keywords -}} {{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }} {{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" /> +{{- end }} <meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}} {{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }} {{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}"> |
