List alternate feeds on RSS page

This commit is contained in:
2024-01-26 23:05:04 +11:00
parent 0b6b305d81
commit f194e216d0
3 changed files with 38 additions and 0 deletions

View File

@@ -9,6 +9,18 @@ xml.channel do |channel|
channel.pubDate Time.now.rfc2822
channel.ttl 1800
channel.alternate_feed do |item|
item.link "/feeds/rss"
item.title "Main feed (this feed)"
item.description "The main feed, with all the posts"
end
channel.alternate_feed do |item|
item.link "/feeds/statuses_rss"
item.title "Statuses / Microblog"
item.description "Ony shorter posts, usually also appearing on Mastodon"
end
posts.each do |post|
channel.item do |item|
item.title post.display_title

View File

@@ -9,6 +9,18 @@ xml.channel do |channel|
channel.pubDate Time.now.rfc2822
channel.ttl 1800
channel.alternate_feed do |item|
item.link "/feeds/rss"
item.title "Main feed"
item.description "The main feed, with all the posts"
end
channel.alternate_feed do |item|
item.link "/feeds/statuses_rss"
item.title "Statuses / Microblog (this feed)"
item.description "Ony shorter posts, usually also appearing on Mastodon"
end
posts.each do |post|
channel.item do |item|
item.title post.raw_content

View File

@@ -30,6 +30,20 @@
Visit Website →
</a>
</header>
<h2>Alternate feeds</h2>
<xsl:for-each select="/channel/alternate_feed">
<div class="pb-5">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
<p><xsl:value-of select="description"/></p>
</div>
</xsl:for-each>
<h2>Recent Items</h2>
<xsl:for-each select="/channel/item">
<div class="pb-5">