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">
|
||||
|
||||
<channel>
|
||||
<title>Broken Moon Network</title>
|
||||
<link>https://www.broken-moon.net</link>
|
||||
<description>A personal project of Astoria.</description>
|
||||
|
||||
<% pageArray = Array.new %>
|
||||
<% folders.each do |folder| %>
|
||||
<% if Dir.exists? folder %>
|
||||
<% contents = Dir.children("./" + folder) %>
|
||||
<% if !contents.empty? %>
|
||||
<% contents.each do |content| %>
|
||||
<% begin %>
|
||||
<% newPage = Page.new(folder + "/" + content) %>
|
||||
<% rescue %>
|
||||
<% puts "bad times at " + content %>
|
||||
<% else %>
|
||||
<% pageArray.push(newPage) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% pageArray.sort_by! { |page| page.get_date } %>
|
||||
|
||||
<% pageArray.reverse.each do | page | %>
|
||||
<%= page.get_feed_entry %>
|
||||
<% end %>
|
||||
<%- pageArray = Array.new -%>
|
||||
<%- folders = ["media", "technology", "news"] -%>
|
||||
<%- folders.each do |folder| -%>
|
||||
<%- if Dir.exists? folder -%>
|
||||
<%- contents = Dir.children("./" + folder) -%>
|
||||
<%- if !contents.empty? -%>
|
||||
<%- contents.each do |content| -%>
|
||||
<%- begin -%>
|
||||
<%- newPage = Page.new(folder + "/" + content) -%>
|
||||
<%- rescue -%>
|
||||
<%- puts "bad times at " + content -%>
|
||||
<%- else -%>
|
||||
<%- pageArray.push(newPage) -%>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- pageArray.sort_by! { |page| page.get_date } -%>
|
||||
<%- pageArray.reverse.each do | page | -%>
|
||||
<%=- page.get_feed_entry %>
|
||||
<%- end -%>
|
||||
</channel>
|
||||
|
||||
</rss>
|
Loading…
Reference in New Issue