From b3ca054e398e4e3a342b671266f59820efb1c4a9 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Wed, 25 Jan 2023 14:21:58 +0000 Subject: [PATCH] second attempt at RSS --- config.toml | 6 ++++ layouts/_default/rss.xml | 62 ++++++++++++++-------------------------- 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/config.toml b/config.toml index 2cc13a1..64747b9 100644 --- a/config.toml +++ b/config.toml @@ -11,6 +11,12 @@ enableInlineShortcodes = true enableGitInfo = true canonifyurls = true +[frontmatter] + date = ["date", "publishDate", "lastmod"] + lastmod = [":fileModTime", "lastmod", ":git", "publishDate"] + publishDate = ["publishDate", "date"] + expiryDate = ["expiryDate"] + [markup] [markup.goldmark.renderer] unsafe= true diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 094d706..b0b150b 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -34,53 +34,35 @@ {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} {{ range $pages }} - {{ if or (eq .Title "Links") (eq .Title "Videos") }} - {{else}} {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} - - {{ if isset .Params "enclosure" }} - {{ $cdnUrl := .Site.Params.podcastCdnUrl }} - Podcast: {{.Params.series }} - - - {{`

{{end}} - {{ .Summary | safeHTML }} - ]]> -
- - {{`

- {{ .Content | safeHTML }} - ]]> -
- {{ else }} - {{ if isset .Params "topic" }}Reading: {{ .Params.topic }} - {{else}} - Blog: {{.Params.topics }} - {{ end }} - {{ if isset .Params "image" }} + {{ if isset .Params "image" }} + {{ with .Params.image }} + + {{ end }} + {{ end }} + + + {{`

{{end}} + {{ .Summary | safeHTML }} + ]]> +
+ + {{`{{ end }} - {{ else }} - - {{ end }} - - {{`

{{ end }} - {{ .Summary | safeHTML }} - ]]> -
- {{ end }} +

+ {{end}} + {{ .Content | safeHTML }} + ]]> +
- {{ end }} - {{ end }} + {{ end }} \ No newline at end of file