From dc455ebe0ded9ce838aa3459346d2df0d43bfae8 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 24 May 2022 21:22:27 +0200 Subject: Use site.Params.Description as a fallback --- layouts/partials/description.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'layouts/partials') 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 -- cgit v1.2.3