Class: Jekyll::Categories::CategoryIndex
- Inherits:
-
Page
- Object
- Page
- Jekyll::Categories::CategoryIndex
- Defined in:
- lib/jekyll-categories.rb
Instance Method Summary collapse
-
#initialize(site, base, dir, category) ⇒ CategoryIndex
constructor
A new instance of CategoryIndex.
Constructor Details
#initialize(site, base, dir, category) ⇒ CategoryIndex
Returns a new instance of CategoryIndex.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jekyll-categories.rb', line 6 def initialize(site, base, dir, category) @site = site @base = base @dir = dir @name = 'index.html' self.process(@name) self.read_yaml(File.join(base, '_layouts'), 'category_index.html') self.data['category'] = category category_title_prefix = site.config['category_title_prefix'] || 'Category: ' self.data['title'] = "#{category_title_prefix}#{category}" end |