Class: Jekyll::Authors::AuthorIndex

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AuthorIndex.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/jekyll-authors.rb', line 6

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
  author_title_prefix = site.config['author_title_prefix'] || 'Author: '
  self.data['title'] = "#{author_title_prefix}#{author}"
end