From 0721e9d1370109a1c0c96e3c3b3754a4c2ffc659 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 25 Jan 2025 00:02:52 +0100 Subject: fix post edit count --- _plugins/filters.rb | 2 +- _plugins/meta.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_plugins/filters.rb b/_plugins/filters.rb index 95a5c78..c4ee527 100644 --- a/_plugins/filters.rb +++ b/_plugins/filters.rb @@ -10,7 +10,7 @@ module Filters end def plural(num, counter) - return "#{num} #{counter}#{counter == 1 ? '' : 's'}" + return "#{num} #{counter}#{num == 1 ? '' : 's'}" end def post_sort(posts, sort_by) diff --git a/_plugins/meta.rb b/_plugins/meta.rb index 5caa6b6..d1d4a24 100644 --- a/_plugins/meta.rb +++ b/_plugins/meta.rb @@ -40,6 +40,7 @@ class Meta < Jekyll::Generator data['authors'] = git_log.map{ |c| c['author'] }.uniq data['date_initial'] = git_log.first['date'] data['date'] = git_log.last['date'] + data['edits'] = git_log.length - 1 # original commit is not an edit return data end end -- cgit v1.2.3