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/index.atom.xml | 3 ++- layouts/index.gemini_atom.xml | 3 ++- layouts/taxonomy/taxonomy.atom.xml | 3 ++- layouts/taxonomy/taxonomy.gemini_atom.xml | 3 ++- layouts/term/term.atom.xml | 3 ++- layouts/term/term.gemini_atom.xml | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml index 3fbf10b..d31c3fd 100644 --- a/layouts/index.atom.xml +++ b/layouts/index.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/index.gemini_atom.xml b/layouts/index.gemini_atom.xml index b69251a..014cfdb 100644 --- a/layouts/index.gemini_atom.xml +++ b/layouts/index.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") }} diff --git a/layouts/taxonomy/taxonomy.atom.xml b/layouts/taxonomy/taxonomy.atom.xml index 94fbeff..5749d56 100644 --- a/layouts/taxonomy/taxonomy.atom.xml +++ b/layouts/taxonomy/taxonomy.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/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml index d933d49..a3db9a2 100644 --- a/layouts/taxonomy/taxonomy.gemini_atom.xml +++ b/layouts/taxonomy/taxonomy.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") }} 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