tilde.town/feed.tmpl.xml
Case eca0447a35 Add feed generating capabilities
`feed.tmpl.xml` should be RSS2.0-conforming.  Ideally each news item
would have a date of publication, but RSS doesn't require it.

I found it easier to copy `genblog.go` to `genfeed.go` than to shoehorn
in feed logic to the blog generator.  As such, `genfeed.go` might have
some unnecessary stuff in it (though the go compiler didn't complain, so
who knows?!).  I also added the necessary machinery in
`generate_homepage`.

Of course, I did very minimal testing.
2022-09-08 22:57:19 -05:00

20 lines
622 B
XML

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>tilde.town blog</title>
<description>web log of tilde town</description>
<link>https://tilde.town/blog.html</link>
<atom:link rel="self" type="application/rss+xml" href="https://tilde.town/blog.xml"/>
{{ range .News }}
<item>
<title>{{.Title}}</title>
<pubDate>{{.Pubdate}}</pubDate>
<description>
<![CDATA[{{.Content}}]]>
</description>
<guid isPermalink="false">{{.Pubdate}}-{{.Title}}</guid>
</item>
{{ end }}
</channel>
</rss>