From: Duje Mihanović Date: Sat, 16 Sep 2023 11:56:52 +0000 (+0200) Subject: Switch to Atom feed X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=8758f3622c22bc267c1e6ea21cb8621d453d0382;p=dujemihanovic.xyz.git Switch to Atom feed --- diff --git a/layouts/rss.xml b/layouts/rss.xml index 18d4ff6..b43900f 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -1,29 +1,34 @@ -{{- printf "" | safeHTML }} - - - {{ .Site.Title }} - {{ .Permalink }} - Recent content on {{ .Site.Title }} - Hugo -- gohugo.io - {{ site.Language.LanguageCode }}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} - {{.}}{{end}}{{ if not .Date.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{- with .OutputFormats.Get "RSS" -}} - {{ printf "" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ with .Site.GetPage "posts/" }} - {{ range .Pages | first .Site.Config.Services.RSS.Limit }} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - {{ .Content | html }} - - {{ end }} - {{ end }} - - +{{- printf "" | safeHTML }} + + {{ .Site.Title }} + {{ .Permalink }} + {{ $lastmod := 0 }} + {{ range (.Site.GetPage "/posts").Pages }} + {{ if gt .Lastmod $lastmod }} + {{ $lastmod = .Lastmod }} + {{ end }} + {{ end }} + {{ $lastmod.Format "2006-01-02T15:04:05Z" }} + + + + {{ $.Site.Author.name }} + {{ $.Site.Author.email }} + {{ .Permalink }} + + Hugo + + {{ with $.Site.GetPage "posts/" }} + {{ range first .Site.Config.Services.RSS.Limit .Pages }} + + {{ .Permalink }} + + {{ .Title }} + {{ .Lastmod.Format "2006-01-02T15:04:05Z" }} + {{ .PublishDate.Format "2006-01-02T15:04:05Z" }} + {{ .Content | html }} + {{ .Summary | html }} + + {{ end }} + {{ end }} +