summaryrefslogtreecommitdiffstats
path: root/layouts/partials/description.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-24 21:22:27 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-24 21:22:27 +0200
commitdc455ebe0ded9ce838aa3459346d2df0d43bfae8 (patch)
tree667c95dbd63bf5d911a3865af3b1b115f8820fcb /layouts/partials/description.html
parent8ab030afb415a4ae04baeb81248b4dfa0770a02d (diff)
downloadgohugo-theme-ed-dc455ebe0ded9ce838aa3459346d2df0d43bfae8.tar.gz
Use site.Params.Description as a fallback
Diffstat (limited to 'layouts/partials/description.html')
-rw-r--r--layouts/partials/description.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/description.html b/layouts/partials/description.html
index b2100a8..41793a7 100644
--- a/layouts/partials/description.html
+++ b/layouts/partials/description.html
@@ -10,6 +10,10 @@
{{- else -}}
{{- $description = print .Summary -}}
{{- end -}}
+
+ {{ if eq (len $description) 0 -}}
+ {{- $description = site.Params.Description -}}
+ {{ end -}}
{{- end -}}
{{- /* Meta descriptions can technically be any length, but Google generally