public
Fork of rubys/mars
Description: Yet Another Planet Refactoring
Homepage: http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring
Clone URL: git://github.com/technomancy/mars.git
blogroll in example template should use config values
technomancy (author)
Fri Jun 27 17:43:14 -0700 2008
commit  84a4c104d87122d3c8e9e9554cddb85ebd83540a
tree    a976041d802413e961c78f6d29890769b6b15a86
parent  ba8c737efc5e9123458d085dae8701e32560b971
...
5
6
7
8
9
10
11
12
...
5
6
7
 
 
8
9
10
0
@@ -5,8 +5,6 @@ module Planet
0
     module_function
0
     
0
     def process(template, feed)
0
- # TODO: decouple from REXML structure. rfeedparser makes this easy.
0
- @sources = []
0
       ::ERB.new(File.read(template)).result(binding)
0
     end
0
 
...
53
54
55
56
57
58
59
60
 
 
61
62
 
63
64
65
...
53
54
55
 
 
 
 
 
56
57
58
 
59
60
61
62
0
@@ -53,13 +53,10 @@
0
     <div id="footer">
0
       <h2>Subscriptions</h2>
0
       <ul>
0
- <% feed.each_element('//source') do |elt| %>
0
- <% next if @sources.include?(source_link) %>
0
- <% @sources << source_link %>
0
- <% @elt = @source = elt %>
0
- <li><a title="subscribe" href="<%= source_link('self') %>">
0
+ <% Planet.config['feeds'].each do |name, feed_url| %>
0
+ <li><a title="subscribe" href="<%= feed_url %>">
0
    <img src="images/feed-icon-10x10.png" alt="(feed)"/></a>
0
- <a href="<%= source_link %>"><%= elt.get_elements('title').first.text %></a>
0
+ <a href="<%= feed_url %>"><%= name %></a>
0
   </li>
0
   <% end %>
0
       </ul>

Comments

    No one has commented yet.