diff options
author | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-08-16 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-08-16 00:00:00 +0000 |
commit | 319b50e2574543d5c565be1d107a623bbdbbc2d5d56f2c73121470bee3e9fb0c (patch) | |
tree | 6467a8e841d0b341b9d8f28857cb95efd42b0303df342ca78576e7e6ccb65a7a /layouts/taxonomy | |
parent | 1add0ac5ec185a7ffcdc2fd2b453211bbd3c122d645c0fbdf13b3464b8e05d37 (diff) | |
download | hugo-theme-journal-319b50e2574543d5c565be1d107a623bbdbbc2d5d56f2c73121470bee3e9fb0c.tar.gz hugo-theme-journal-319b50e2574543d5c565be1d107a623bbdbbc2d5d56f2c73121470bee3e9fb0c.zip |
Make email subelement optional in Atom feeds
Elements which are optional in the Atom feed spec should also be
optional in the templates.
Diffstat (limited to 'layouts/taxonomy')
-rw-r--r-- | layouts/taxonomy/taxonomy.atom.xml | 3 | ||||
-rw-r--r-- | layouts/taxonomy/taxonomy.gemini_atom.xml | 3 |
2 files changed, 4 insertions, 2 deletions
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 @@ <link href="{{ .Permalink }}" rel="alternate" /> <author> <name>{{ .Site.Params.author.name }}</name> - <email>{{ .Site.Params.author.email }}</email> + {{- with .Site.Params.author.email }} + <email>{{ . }}</email>{{ end }} </author> <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights> 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 @@ <link href="{{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" | safeURL }}" rel="alternate" /> <author> <name>{{ .Site.Params.author.name }}</name> - <email>{{ .Site.Params.author.email }}</email> + {{- with .Site.Params.author.email }} + <email>{{ . }}</email>{{ end }} </author> <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }}</rights> |