🖥️ wip: Set up RSS feed

This commit is contained in:
Keith Solomon
2025-04-21 15:49:57 -05:00
parent 06c6523b5d
commit 6dd7e8874e

22
templates/feed.xml Normal file
View File

@@ -0,0 +1,22 @@
{{- define "rss_feed" -}}
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>{{ .Title }}</title>
<link>{{ .SiteURL }}</link>
<description>{{ .Description }}</description>
<language>en-us</language>
<lastBuildDate>{{ .BuildDate }}</lastBuildDate>
{{ range .Posts }}
<item>
<title>{{ .Title }}</title>
<link>{{ $.SiteURL }}/blog/{{ .Slug }}/</link>
<guid>{{ $.SiteURL }}/blog/{{ .Slug }}/</guid>
<pubDate>{{ .DateFormatted }}</pubDate>
<description><![CDATA[{{ .Description }}]]></description>
</item>
{{ end }}
</channel>
</rss>
{{- end -}}