Class: Jekyll::GitAuthorTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll-planningwikiplugins.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag_name, text, tokens) ⇒ GitAuthorTag

Returns a new instance of GitAuthorTag.



5
6
7
8
# File 'lib/jekyll-planningwikiplugins.rb', line 5

def initialize(tag_name, text, tokens)
    super
    @text = text
end

Instance Method Details

#lookup(context, name) ⇒ Object



10
11
12
13
14
# File 'lib/jekyll-planningwikiplugins.rb', line 10

def lookup(context, name)
    lookup = context
    name.encode('UTF-8').split(".").each { |value| lookup = lookup[value] }
    lookup
end

#render(context) ⇒ Object



16
17
18
# File 'lib/jekyll-planningwikiplugins.rb', line 16

def render(context)
    `git log --pretty=format:"%an," #{lookup(context, 'page.path')} | sort | uniq | grep -v -F "adamgreen,"`
end