mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 03:34:17 +08:00
8855a0bfbe
Adds TopicView#recent_posts; Post#by_newest, #with_user, #author_readable; User#readable_name Autodiscovery tag in topic show HTML.
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
<title><%= @topic_view.title %></title>
|
|
<link><%= Discourse.base_url %><%= @topic_view.relative_url %></link>
|
|
<description><%= @topic_view.posts.first.raw %></description>
|
|
<atom:link href="<%= Discourse.base_url %><%= @topic_view.relative_url %>.rss" rel="self" type="application/rss+xml" />
|
|
<% @topic_view.recent_posts.each do |post| %>
|
|
<item>
|
|
<title><%= @topic_view.title %> at <%= post.created_at %></title>
|
|
<description><![CDATA[
|
|
<p><%= post.author_readable %> wrote:</p>
|
|
<%= post.cooked.html_safe %>
|
|
]]></description>
|
|
<link><%= Discourse.base_url %><%= post.url %></link>
|
|
<pubDate><%= post.created_at.rfc2822 %></pubDate>
|
|
<guid><%= Discourse.base_url %><%= post.url %></guid>
|
|
<source url="<%= Discourse.base_url %><%= @topic_view.relative_url %>.rss"><%= @topic_view.title %></source>
|
|
</item>
|
|
<% end %>
|
|
</channel>
|
|
</rss>
|