From 319b50e2574543d5c565be1d107a623bbdbbc2d5d56f2c73121470bee3e9fb0c Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 16 Aug 2024 00:00:00 +0000 Subject: Make email subelement optional in Atom feeds Elements which are optional in the Atom feed spec should also be optional in the templates. --- layouts/term/term.atom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layouts/term/term.atom.xml') diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml index 94fbeff..5749d56 100644 --- a/layouts/term/term.atom.xml +++ b/layouts/term/term.atom.xml @@ -7,7 +7,8 @@ {{ .Site.Params.author.name }} - {{ .Site.Params.author.email }} + {{- with .Site.Params.author.email }} + {{ . }}{{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} -- cgit v1.2.3