Feed fixes
parent
b206070606
commit
1b004404b4
@ -1,34 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<rss version="2.0">
|
<rss version="2.0">
|
||||||
|
|
||||||
<channel>
|
<channel>
|
||||||
<title>Broken Moon Network</title>
|
<title>Broken Moon Network</title>
|
||||||
<link>https://www.broken-moon.net</link>
|
<link>https://www.broken-moon.net</link>
|
||||||
<description>A personal project of Astoria.</description>
|
<description>A personal project of Astoria.</description>
|
||||||
|
<%- pageArray = Array.new -%>
|
||||||
<% pageArray = Array.new %>
|
<%- folders = ["media", "technology", "news"] -%>
|
||||||
<% folders.each do |folder| %>
|
<%- folders.each do |folder| -%>
|
||||||
<% if Dir.exists? folder %>
|
<%- if Dir.exists? folder -%>
|
||||||
<% contents = Dir.children("./" + folder) %>
|
<%- contents = Dir.children("./" + folder) -%>
|
||||||
<% if !contents.empty? %>
|
<%- if !contents.empty? -%>
|
||||||
<% contents.each do |content| %>
|
<%- contents.each do |content| -%>
|
||||||
<% begin %>
|
<%- begin -%>
|
||||||
<% newPage = Page.new(folder + "/" + content) %>
|
<%- newPage = Page.new(folder + "/" + content) -%>
|
||||||
<% rescue %>
|
<%- rescue -%>
|
||||||
<% puts "bad times at " + content %>
|
<%- puts "bad times at " + content -%>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<% pageArray.push(newPage) %>
|
<%- pageArray.push(newPage) -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
<%- pageArray.sort_by! { |page| page.get_date } -%>
|
||||||
<% pageArray.sort_by! { |page| page.get_date } %>
|
<%- pageArray.reverse.each do | page | -%>
|
||||||
|
<%=- page.get_feed_entry %>
|
||||||
<% pageArray.reverse.each do | page | %>
|
<%- end -%>
|
||||||
<%= page.get_feed_entry %>
|
|
||||||
<% end %>
|
|
||||||
</channel>
|
</channel>
|
||||||
|
|
||||||
</rss>
|
</rss>
|
Loading…
Reference in New Issue