discourse/app/views/posts/latest.rss.erb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-06-09 07:39:03 -04:00
<?xml version="1.0" encoding="UTF-8" ?>
<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/">
2015-06-09 07:39:03 -04:00
<channel>
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
<title><%= @title %></title>
<link><%= @link %></link>
<description><%= @description %></description>
<% @posts.each do |post| %>
<% next unless post.user %>
2015-06-09 07:39:03 -04:00
<item>
<title><%= post.topic.title %></title>
<dc:creator><![CDATA[<%= "@#{post.user.username}#{" #{post.user.name}" if (post.user.name.present? && SiteSetting.enable_names?)}" -%>]]></dc:creator>
<description><![CDATA[ <%= PrettyText.format_for_email(post.cooked, post).html_safe %> ]]></description>
2015-06-09 07:39:03 -04:00
<link><%= Discourse.base_url + post.url %></link>
<pubDate><%= post.created_at.rfc2822 %></pubDate>
2016-02-22 07:58:02 -05:00
<guid isPermaLink="false"><%= Discourse.current_hostname %>-post-<%= post.id %></guid>
2015-06-09 07:39:03 -04:00
</item>
<% end %>
</channel>
</rss>