mirror of https://github.com/kc0bfv/ticky_tacky_dark.git

Karl
08.22.2019 a5bb76fc2a35eda01e1775b69116df4d5861ae67
Make description and author site/page optional
1 files modified
12 ■■■■ changed files
layouts/partials/head.html 12 ●●●● patch | view | raw | blame | history
layouts/partials/head.html
@@ -1,8 +1,16 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{{ .Params.description }}">
<meta name="author" content="{{ .Params.author }}">
{{- if isset .Params "description" -}} {{- $.Scratch.Set "description" .Params.description -}}
{{- else -}}
    {{- if isset .Site.Params "description" -}} {{- $.Scratch.Set "description" .Site.Params.description -}} {{- end -}}
{{- end }}
{{ with $.Scratch.Get "description" -}}<meta name="description" content="{{ . }}">{{- end }}
{{- if isset .Params "author" -}} {{- $.Scratch.Set "author" .Params.author -}}
{{- else -}}
    {{- if isset .Site.Params "author" -}} {{- $.Scratch.Set "author" .Site.Params.author -}} {{- end -}}
{{- end }}
{{ with $.Scratch.Get "author" -}}<meta name="author" content="{{ . }}">{{- end }}
<link rel="icon" href="/{{ .Site.Params.favicon }}">
<title>{{ .Site.Title }}{{ with .Params.title }} - {{ . }}{{ end }}</title>