Skip to content

Commit

Permalink
only show date, not hours, show 'laast aangepast op' instead of gesch…
Browse files Browse the repository at this point in the history
…reven op
  • Loading branch information
JensTimmerman committed Oct 12, 2020
1 parent fbc76e8 commit e4dc936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layouts/blogpost.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<% end %>
<div class="details animated fadeInRight">
<small>
Geschreven op <%= gitmtime %><br>
Laatst aangepast op <%= gitmtime %><br>
Leestijd: <%= reading_time @item %>
</small>
</div>
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/blog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4dc936

Please sign in to comment.