class JekyllPlugin

Public Class Methods

new(post, hash) click to toggle source
# File lib/jekyll-git-updated.rb, line 5
def initialize(post, hash)
        @post = post
        @hash = hash

        @path = post.path
end

Public Instance Methods

setGitUpdated() click to toggle source
# File lib/jekyll-git-updated.rb, line 12
def setGitUpdated()
        if @post.data['title'] and File.file?(@path)
                @post.data['git-updated'] = `git log -n 1 --pretty=format:%ci "#{@path}"`[0...-6]
        end
end