Class: Jekyll::Authors::AuthorIndex

Inherits:
Page
  • Object
show all
Includes:
Utils
Defined in:
lib/jekyll-authors.rb

Instance Method Summary collapse

Methods included from Utils

#author_title_prefix, #display_name

Constructor Details

#initialize(site, base, dir, author) ⇒ AuthorIndex

Returns a new instance of AuthorIndex.



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/jekyll-authors.rb', line 33

def initialize(site, base, dir, author)
  @site = site
  @base = base
  @dir = dir
  @name = 'index.html'

  self.process(@name)
  self.read_yaml(File.join(base, '_layouts'), 'author_index.html')
  self.data['author'] = author
  self.data['title'] = "#{author_title_prefix}#{display_name(author)}"
end