Add a feed for statuses

This commit is contained in:
2023-04-14 20:19:49 +10:00
parent d3c4723f17
commit c4a1a39740
6 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
xml.instruct!(:xml, version: "2.0", encoding: "utf-8")
xml.channel do |channel|
channel.title "Daniel Nitsikopoulos"
channel.description "The RSS feed for https://dnitza.com"
channel.lastBuildDate Time.now.rfc2822
channel.pubDate Time.now.rfc2822
channel.ttl 1800
posts.each do |post|
channel.item do |item|
item.title post.display_title
item.description do |desc|
desc.cdata! post.feed_content
end
item.guid(post.slug, isPermaLink: true)
item.pubDate post.machine_published_at
end
end
end

View File

@@ -16,6 +16,7 @@ html
link rel="pingback" href=Hanami.app.settings.pingback_url
link rel="feed" type="text/html" href="/posts"
link rel="feed alternate" type="application/rss+xml" href="/feeds/rss"
link rel="feed alternate" type="application/rss+xml" href="/feeds/statuses_rss"
link rel="me" href=Hanami.app.settings.mastodon_url
link rel="me" href=Hanami.app.settings.github_url