Improve category handling. Remove top-bar navigation for now (may bring it back later, in a more customized fashion)

This commit is contained in:
2016-04-12 00:40:17 -04:00
parent 998581a948
commit 4c719fa3cf
6 changed files with 9 additions and 18 deletions

View File

@ -1,15 +1,15 @@
class CategoryPage < Jekyll::Page
def initialize(site, base, dir, category)
def initialize(site, base, category)
@site = site
@base = base
@dir = dir
@dir = category
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
self.data['category'] = category
category_title = site.config['category_titles'][category] || category.capitalize
category_title = site.config["category_titles"][category] || category.capitalize
self.data['title'] = "#{category_title}"
end
end
@ -23,7 +23,7 @@ class CategoryPageGenerator < Jekyll::Generator
end
site.categories.each_key do |category|
site.pages << CategoryPage.new(site, site.source, category, category)
site.pages << CategoryPage.new(site, site.source, category)
end
end