aboutsummaryrefslogtreecommitdiff
path: root/_plugins
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-25 00:02:52 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-25 00:02:52 +0100
commit0721e9d1370109a1c0c96e3c3b3754a4c2ffc659 (patch)
treea4c85c349585487dccd72ba1bc53dfada270e354 /_plugins
parentca3d6e59baade9eafdf5b1d35be617a9947f4d06 (diff)
fix post edit count
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/filters.rb2
-rw-r--r--_plugins/meta.rb1
2 files changed, 2 insertions, 1 deletions
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