rss template
This commit is contained in:
parent
956de25f69
commit
45293c9c21
29
rss.template
Normal file
29
rss.template
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<channel>
|
||||
<title>Mastodon</title>
|
||||
<link>https://mastodon.social</link>
|
||||
<description>Mastodon</description>
|
||||
|
||||
{{range $index, $status := .}}
|
||||
<item>
|
||||
<title>{{$status.Account.Username}} ({{$status.ID}})</title>
|
||||
<content:encoded><![CDATA[
|
||||
{{$user := $status.Account.Username}}
|
||||
|
||||
@{{$user}} ({{$status.ID}}): <br><br>
|
||||
{{replaceAll $status.Content "\n" "<br>"}}
|
||||
{{range $idxMedia, $media := $status.MediaAttachments}}
|
||||
<br><a href="{{$media.URL}}">{{$media.Description}}</a>
|
||||
{{end}}
|
||||
]]></content:encoded>
|
||||
|
||||
<link>{{$status.URL}}</link>
|
||||
<guid>{{$status.URL}}</guid>
|
||||
<pubDate>{{$status.CreatedAt.Format "Mon, 02 Jan 2006 15:04:05 -0700"}}</pubDate>
|
||||
</item>
|
||||
{{- end}}
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
|
Loading…
Reference in New Issue
Block a user