Permalink
Browse files

Merge pull request #86 from kablamo/better_rss

Only use post content in the RSS description field.
  • Loading branch information...
2 parents 9dd1d6f + d8238b9 commit 9dd7c146d8fd9b65aacb74a4c798ae5a6bc41064 @plusjade plusjade committed Sep 1, 2012
Showing with 8 additions and 3 deletions.
  1. +2 −2 lib/ruhoh/compilers/rss.rb
  2. +6 −1 lib/ruhoh/page.rb
@@ -26,7 +26,7 @@ def self.run(target, page)
xml.title_ post['title']
xml.link "#{Ruhoh::DB.site['config']['production_url']}#{post['url']}"
xml.pubDate_ post['date']
- xml.description_ (post['description'] ? post['description'] : page.render)
+ xml.description_ (post['description'] ? post['description'] : page.render_content)
}
end
}
@@ -36,4 +36,4 @@ def self.run(target, page)
end
end #Rss
end #Compiler
-end #Ruhoh
+end #Ruhoh
View
@@ -28,6 +28,11 @@ def render
@templater.render(self.expand_layouts, self.payload)
end
+ def render_content
+ self.ensure_id
+ @templater.render('{{{content}}}', self.payload)
+ end
+
def process_layouts
self.ensure_id
if @data['layout']
@@ -103,4 +108,4 @@ def ensure_id
end
end #Page
-end #Ruhoh
+end #Ruhoh

0 comments on commit 9dd7c14

Please sign in to comment.