diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 50043cb..d1326cd 100644 --- a/layouts/blogpost.erb +++ b/layouts/blogpost.erb @@ -9,7 +9,7 @@ - + diff --git a/lib/helpers/blog.rb b/lib/helpers/blog.rb index 96db131..0adee5e 100644 --- a/lib/helpers/blog.rb +++ b/lib/helpers/blog.rb @@ -25,4 +25,15 @@ module BlogHelper HTML end + + def gitmtime + # find file extension + filepath=@item[:content_filename] + str=`git log -1 --format='%ci' -- #{filepath}` + if str == "" + return @item[:created_at] + else + return DateTime.parse( str ) + end +end end