mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: rss feed should be valid
This commit is contained in:
parent
2282869f30
commit
7a20ed0617
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@
|
||||||
<lastBuildDate><%= @topic_list.topics.first.created_at.rfc2822 %></lastBuildDate>
|
<lastBuildDate><%= @topic_list.topics.first.created_at.rfc2822 %></lastBuildDate>
|
||||||
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
|
<atom:link href="<%= @atom_link %>" rel="self" type="application/rss+xml" />
|
||||||
<% @topic_list.topics.each do |topic| %>
|
<% @topic_list.topics.each do |topic| %>
|
||||||
<% topic_url = topic.relative_url -%>
|
<% topic_url = topic.url -%>
|
||||||
<item>
|
<item>
|
||||||
<title><%= topic.title %></title>
|
<title><%= topic.title %></title>
|
||||||
<author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if (topic.user.name.present? && SiteSetting.enable_names?)})" -%></author>
|
<author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if (topic.user.name.present? && SiteSetting.enable_names?)})" -%></author>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<% topic_url = @topic_view.relative_url %>
|
<% topic_url = @topic_view.absolute_url %>
|
||||||
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
|
<% lang = SiteSetting.find_by_name('default_locale').try(:value) %>
|
||||||
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
|
<% site_email = SiteSetting.find_by_name('contact_email').try(:value) %>
|
||||||
<title><%= @topic_view.title %></title>
|
<title><%= @topic_view.title %></title>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<link><%= post_url %></link>
|
<link><%= post_url %></link>
|
||||||
<pubDate><%= post.created_at.rfc2822 %></pubDate>
|
<pubDate><%= post.created_at.rfc2822 %></pubDate>
|
||||||
<guid isPermaLink="false">post-<%= post.topic_id %>-<%= post.post_number %></guid>
|
<guid isPermaLink="false">post-<%= post.topic_id %>-<%= post.post_number %></guid>
|
||||||
<source url="<%= @topic_view.relative_url %>.rss"><%= @topic_view.title %></source>
|
<source url="<%= @topic_view.absolute_url %>.rss"><%= @topic_view.title %></source>
|
||||||
</item>
|
</item>
|
||||||
<% end %>
|
<% end %>
|
||||||
</channel>
|
</channel>
|
||||||
|
|
Loading…
Reference in a new issue