commit:     3b98f18405f8ac93844bd1344264f586d2e3dc9e
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Sat Aug 22 12:05:53 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 12:05:53 2015 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=3b98f184

Adapt to news changes

 .gitmodules      |  2 +-
 _data/news       |  2 +-
 _plugins/news.rb | 16 +++++++---------
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 79663bc..f67095d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
 [submodule "_data/news"]
        path = _data/news
-       url = git://anongit.gentoo.org/proj/gentoo-news.git
+       url = git://anongit.gentoo.org/data/gentoo-news.git

diff --git a/_data/news b/_data/news
index 9ab5b27..a50b763 160000
--- a/_data/news
+++ b/_data/news
@@ -1 +1 @@
-Subproject commit 9ab5b274a5f6632910f38c3255484d604568ea3f
+Subproject commit a50b763c338161b4621d23e9fa5cd6e11455d6ca

diff --git a/_plugins/news.rb b/_plugins/news.rb
index e65b08d..a93aa06 100644
--- a/_plugins/news.rb
+++ b/_plugins/news.rb
@@ -6,15 +6,13 @@ module Gentoo
       site.data['newsitems'] ||= []
 
       Dir.chdir(NEWS_DIR) do
-        Dir.glob('[0-9][0-9][0-9][0-9]').reverse.each do |year|
-          Dir.glob("#{year}/[0-9][0-9][0-9][0-9]*").reverse.each do |path|
-            begin
-              name = path.gsub(/#{year}\//, '')
-
-              site.pages << NewsPage.new(site, path, name)
-            rescue
-              # fail them silently
-            end
+        Dir.glob("[0-9][0-9][0-9][0-9]*").reverse.each do |path|
+          begin
+            name = path
+
+            site.pages << NewsPage.new(site, path, name)
+          rescue
+            # fail them silently
           end
         end
       end

Reply via email to