From 95686c0326844bcd333cf0c209059e7360308ec9 Mon Sep 17 00:00:00 2001 From: v1ne Date: Tue, 19 Nov 2019 22:12:28 +0100 Subject: [PATCH] Meta: Only print meta entries if they are actually defined --- layouts/partials/meta.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 6a1975a..fec0354 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -1,6 +1,9 @@ + {{- $author := .Site.Params.Author -}} + {{- $description := or (.Description) (.Site.Params.Description) -}} + {{- $keywords := or (.Keywords) (.Site.Params.Keywords) -}} - - - \ No newline at end of file + {{ if $author -}} {{- end }} + {{ if $description -}} {{- end }} + {{ if $keywords -}} {{- end }}