🖥️ wip: Set up RSS feed
This commit is contained in:
22
templates/feed.xml
Normal file
22
templates/feed.xml
Normal 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 -}}
|
||||
Reference in New Issue
Block a user