From 5922472635a618dc24ee98c990037ad34ba98b5b60077aa246fbb52ecbc58c49 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 16 Aug 2024 00:00:00 +0000 Subject: Make author element optional in Atom feeds --- layouts/index.atom.xml | 5 +++-- layouts/index.gemini_atom.xml | 5 +++-- layouts/taxonomy/taxonomy.atom.xml | 5 +++-- layouts/taxonomy/taxonomy.gemini_atom.xml | 5 +++-- layouts/term/term.atom.xml | 5 +++-- layouts/term/term.gemini_atom.xml | 5 +++-- 6 files changed, 18 insertions(+), 12 deletions(-) (limited to 'layouts') diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml index f65c1fe..6c3a111 100644 --- a/layouts/index.atom.xml +++ b/layouts/index.atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }} diff --git a/layouts/index.gemini_atom.xml b/layouts/index.gemini_atom.xml index fc0a12a..3b99fcf 100644 --- a/layouts/index.gemini_atom.xml +++ b/layouts/index.gemini_atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }} diff --git a/layouts/taxonomy/taxonomy.atom.xml b/layouts/taxonomy/taxonomy.atom.xml index 50d72fa..9ceeb79 100644 --- a/layouts/taxonomy/taxonomy.atom.xml +++ b/layouts/taxonomy/taxonomy.atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} diff --git a/layouts/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml index 098cc4f..52bd9f7 100644 --- a/layouts/taxonomy/taxonomy.gemini_atom.xml +++ b/layouts/taxonomy/taxonomy.gemini_atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml index 50d72fa..9ceeb79 100644 --- a/layouts/term/term.atom.xml +++ b/layouts/term/term.atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} diff --git a/layouts/term/term.gemini_atom.xml b/layouts/term/term.gemini_atom.xml index a4826bc..1323308 100644 --- a/layouts/term/term.gemini_atom.xml +++ b/layouts/term/term.gemini_atom.xml @@ -37,11 +37,12 @@ {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} + {{- with $authorName }} - {{ $authorName }} + {{ . }} {{- with $authorEmail }} {{ . }}{{ end }} - + {{ end }} Hugo -- gohugo.io {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} -- cgit v1.2.3