add tag feeds
This commit is contained in:
parent
a879c396bb
commit
b53573a837
9 changed files with 149 additions and 33 deletions
15
lib/pleroma/web/templates/feed/feed/_tag_activity.xml.eex
Normal file
15
lib/pleroma/web/templates/feed/feed/_tag_activity.xml.eex
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<item>
|
||||
<title><%= activity_title(@object, Keyword.get(@feed_config, :post_title, %{})) %></title>
|
||||
|
||||
|
||||
<guid isPermalink="true"><%= activity_context(@activity) %></guid>
|
||||
<link><%= activity_context(@activity) %></link>
|
||||
<pubDate><%= pub_date(@data["published"]) %></pubDate>
|
||||
|
||||
<description><%= activity_content(@object) %></description>
|
||||
<%= for attachment <- @data["attachment"] || [] do %>
|
||||
<enclosure url="<%= attachment_href(attachment) %>" type="<%= attachment_type(attachment) %>"/>
|
||||
<% end %>
|
||||
|
||||
</item>
|
||||
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed
|
||||
xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||
xmlns:activity="http://activitystrea.ms/spec/1.0/"
|
||||
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
||||
xmlns:ostatus="http://ostatus.org/schema/1.0">
|
||||
<rss version="2.0" xmlns:webfeeds="http://webfeeds.org/rss/1.0">
|
||||
<channel>
|
||||
|
||||
<title>TAGS</title>
|
||||
</feed>
|
||||
|
||||
<title>#<%= @tag %></title>
|
||||
<description>These are public toots tagged with #<%= @tag %>. You can interact with them if you have an account anywhere in the fediverse.</description>
|
||||
<link><%= '#{tag_feed_url(@conn, :feed, @tag)}.rss' %></link>
|
||||
<webfeeds:logo><%= feed_logo() %></webfeeds:logo>
|
||||
<webfeeds:accentColor>2b90d9</webfeeds:accentColor>
|
||||
<%= for activity <- @activities do %>
|
||||
<%= render @view_module, "_tag_activity.xml", Map.merge(assigns, prepare_activity(activity)) %>
|
||||
<% end %>
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue