From e4dc9365a4220d1bae347da601c4d2828abdfee9 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Mon, 12 Oct 2020 23:47:58 +0200 Subject: [PATCH] only show date, not hours, show 'laast aangepast op' instead of geschreven op --- layouts/blogpost.erb | 2 +- lib/helpers/blog.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 9b06796b..6584e92a 100644 --- a/layouts/blogpost.erb +++ b/layouts/blogpost.erb @@ -28,7 +28,7 @@ <% end %>
- Geschreven op <%= gitmtime %>
+ Laatst aangepast op <%= gitmtime %>
Leestijd: <%= reading_time @item %>
diff --git a/lib/helpers/blog.rb b/lib/helpers/blog.rb index 0adee5ef..6f0a6c6d 100644 --- a/lib/helpers/blog.rb +++ b/lib/helpers/blog.rb @@ -27,9 +27,9 @@ def figure(img_url, caption, alt = nil, img_class: nil) end def gitmtime - # find file extension + # find file last modification time filepath=@item[:content_filename] - str=`git log -1 --format='%ci' -- #{filepath}` + str=`git log -1 --format=%cd --date=short -- #{filepath}` if str == "" return @item[:created_at] else