2013-02-28 11:36:12 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2015-06-10 04:34:20 +08:00
|
|
|
<rss version="2.0" xmlns:discourse="http://www.discourse.org/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
2013-02-28 11:36:12 +08:00
|
|
|
<channel>
|
2013-12-15 17:17:39 +08:00
|
|
|
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
|
2013-12-19 00:06:36 +08:00
|
|
|
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
|
2013-07-06 04:49:06 +08:00
|
|
|
<title><%= @title %></title>
|
|
|
|
<link><%= @link %></link>
|
|
|
|
<description><%= @description %></description>
|
2015-01-24 07:57:29 +08:00
|
|
|
<% if lang %><language><%= lang%></language><% end %>
|
2014-01-18 06:52:06 +08:00
|
|
|
<% if @topic_list.topics && @topic_list.topics.length > 0 %>
|
|
|
|
<lastBuildDate><%= @topic_list.topics.first.created_at.rfc2822 %></lastBuildDate>
|
|
|
|
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
|
|
|
|
<% @topic_list.topics.each do |topic| %>
|
2015-05-11 13:20:24 +08:00
|
|
|
<% topic_url = topic.url -%>
|
2014-01-18 06:52:06 +08:00
|
|
|
<item>
|
|
|
|
<title><%= topic.title %></title>
|
2015-06-10 04:34:20 +08:00
|
|
|
<dc:creator><![CDATA[<%= "@#{topic.user.username}#{" #{topic.user.name}" if (topic.user.name.present? && SiteSetting.enable_names?)}" -%>]]></dc:creator>
|
2014-01-18 06:52:06 +08:00
|
|
|
<category><%= topic.category.name %></category>
|
|
|
|
<description><![CDATA[
|
2015-02-13 00:53:21 +08:00
|
|
|
<p><%= t('author_wrote', author: link_to("@#{topic.user.username}", "#{Discourse.base_url}/users/#{topic.user.username_lower}")).html_safe %></p>
|
2014-01-18 06:52:06 +08:00
|
|
|
<blockquote>
|
|
|
|
<%= topic.posts.first.cooked.html_safe %>
|
|
|
|
</blockquote>
|
|
|
|
<p><%= t 'num_posts' %> <%= topic.posts_count %></p>
|
|
|
|
<p><%= t 'num_participants' %> <%= topic.participant_count %></p>
|
|
|
|
<p><%= link_to t('read_full_topic'), topic_url %></p>
|
|
|
|
]]></description>
|
|
|
|
<link><%= topic_url %></link>
|
|
|
|
<pubDate><%= topic.created_at.rfc2822 %></pubDate>
|
2014-11-25 01:40:33 +08:00
|
|
|
<discourse:topicPinned><%= topic.pinned_at ? 'Yes' : 'No' %></discourse:topicPinned>
|
|
|
|
<discourse:topicClosed><%= topic.closed ? 'Yes' : 'No' %></discourse:topicClosed>
|
|
|
|
<discourse:topicArchived><%= topic.archived ? 'Yes' : 'No' %></discourse:topicArchived>
|
2016-02-22 20:58:02 +08:00
|
|
|
<guid isPermaLink="false"><%= Discourse.current_hostname %>-topic-<%= topic.id %></guid>
|
2014-01-18 06:52:06 +08:00
|
|
|
<source url="<%= topic_url %>.rss"><%= topic.title %></source>
|
|
|
|
</item>
|
|
|
|
<% end %>
|
2013-02-28 11:36:12 +08:00
|
|
|
<% end %>
|
|
|
|
</channel>
|
|
|
|
</rss>
|