From 108a7fc32e1a9f7b18f2f6aea4d6ab1a59f3e771 Mon Sep 17 00:00:00 2001 From: Set Sakrecoer Date: Sun, 28 Apr 2019 20:10:16 +0200 Subject: [PATCH] deleting old plugin --- _plugins/WithinCategoryPostNavigation.rb | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 _plugins/WithinCategoryPostNavigation.rb diff --git a/_plugins/WithinCategoryPostNavigation.rb b/_plugins/WithinCategoryPostNavigation.rb deleted file mode 100644 index 36dff91..0000000 --- a/_plugins/WithinCategoryPostNavigation.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Jekyll - class WithinCategoryPostNavigation < Generator - def generate(site) - site.categories.each_pair do |category, posts| - posts.sort! { |a,b| b <=> a} - posts.each do |post| - index = posts.index post - next_in_category = nil - previous_in_category = nil - if index - if index < posts.length - 1 - next_in_category = posts[index + 1] - end - if index > 0 - previous_in_category = posts[index - 1] - end - end - post.data["next_in_category"] = next_in_category unless next_in_category.nil? - post.data["previous_in_category"] = previous_in_category unless previous_in_category.nil? - end - end - end - end -end