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 ++- layouts/term/term.gemini_atom.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'layouts/term') 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") }} diff --git a/layouts/term/term.gemini_atom.xml b/layouts/term/term.gemini_atom.xml index d933d49..a3db9a2 100644 --- a/layouts/term/term.gemini_atom.xml +++ b/layouts/term/term.gemini_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