Add rss feed for latest and hot

This commit is contained in:
Neil Lalonde
2013-07-05 16:49:06 -04:00
parent 4c90b16681
commit 1c0e0da683
4 changed files with 29 additions and 5 deletions

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><%= @category.name %></title>
<link><%= Discourse.base_url %>/category/<%= @category.slug %></link>
<description><%= t 'topics_in_category', category: @category.name %><%= @category.description %></description>
<atom:link href="<%= Discourse.base_url %>/category/<%= @category.slug %>.rss" rel="self" type="application/rss+xml" />
<title><%= @title %></title>
<link><%= @link %></link>
<description><%= @description %></description>
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
<% @topic_list.topics.each do |topic| %>
<item>
<title><%= topic.title %></title>