aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-04-25 13:19:17 +0200
committerAlex Legler <alex@a3li.li>2015-04-25 13:22:51 +0200
commit54e3431ef9467bdfd501c3878291905c055385b9 (patch)
treeac14cf72662104b9a38321e44b686aa2ecbe798a /_plugins
parentDouble trailing space means linebreak in markdown. (diff)
downloadwww-54e3431ef9467bdfd501c3878291905c055385b9.tar.gz
www-54e3431ef9467bdfd501c3878291905c055385b9.tar.bz2
www-54e3431ef9467bdfd501c3878291905c055385b9.zip
Skip news items in the planet box
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/planet.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/_plugins/planet.rb b/_plugins/planet.rb
index 4c9df0d..265e703 100644
--- a/_plugins/planet.rb
+++ b/_plugins/planet.rb
@@ -11,6 +11,7 @@ module Gentoo
planetinfo.xpath('/rss/channel/item').each do |item|
item_data = {}
+ ignore = false
item.children.each do |tag|
case tag.name
@@ -22,11 +23,14 @@ module Gentoo
if tag.text =~ /^(.*) \(([^)]+)\)$/
item_data['author'] = $1
item_data['nick'] = $2
+ else
+ # It's a news item; skip
+ ignore = true
end
end
end
- site.data['planet']['posts'] << item_data
+ site.data['planet']['posts'] << item_data unless ignore
end
end