Sha256: 65a690204bc7add9afe6ab71d04161a169b01708465a4c56e19e5eeef5fd81e0

Contents?: true

Size: 250 Bytes

Versions: 11

Compression:

Stored size: 250 Bytes

Contents

Jekyll::Hooks.register :posts, :pre_render do |post|

  # get the current post last modified time
  modification_time = File.mtime( post.path )

  # inject modification_time in post's datas.
  post.data['last-modified-date'] = modification_time

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
casjaysdev-jekyll-theme-0.2.6 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.2.5 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.2.4 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.2.3 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.2.2 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.2.1 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.1.9 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.1.8 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.1.7 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.1.6 _plugins/hook-add-last-modified-date.rb
casjaysdev-jekyll-theme-0.1.4 _plugins/hook-add-last-modified-date.rb