diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 9b06796..6584e92 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 0adee5e..b122e9d 100644 --- a/lib/helpers/blog.rb +++ b/lib/helpers/blog.rb @@ -27,13 +27,13 @@ module BlogHelper 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 - return DateTime.parse( str ) + return str end end end