From 8bc71355a6782a022eb064d1300206db2d44513e Mon Sep 17 00:00:00 2001 From: Kostas Chatzikokolakis Date: Mon, 8 Jul 2024 20:22:12 +0300 Subject: [PATCH] Allow per-page customization of description/keywords --- layouts/partials/head.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 003e4a7..4b7a116 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,15 +1,17 @@ -{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} +{{ with or .Title .Site.Title | plainify }} +{{ . }} +{{ end }} {{ with resources.Get .Site.Params.favicon }} {{ end }} -{{ with .Site.Params.description }} +{{ with or .Description .Site.Params.description | plainify }} {{ end }} -{{ with .Site.Params.meta.keywords }} +{{ with or (delimit .Keywords ", ") .Site.Params.meta.keywords }} {{ end }}