only show date, not hours, show 'laast aangepast op' instead of geschreven op
This commit is contained in:
parent
fbc76e8f7d
commit
804c0b1038
2 changed files with 4 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue