class Jekyll::OpenProjectHelpers::FilteredIndexPage
Each software or spec item can have its tags, and the theme allows to filter each index by a tag. The below generates an additional index page for each tag in an index, like software/Ruby.
Note: this expects “_pages/<index page>.html” to be present in site source, so it would fail if theme setup instructions were not followed fully.
Public Class Methods
new(site, base, dir, tag, items, index_page)
click to toggle source
# File lib/jekyll-theme-open-project-helpers/filterable_index.rb, line 29 def initialize(site, base, dir, tag, items, index_page) @site = site @base = base @dir = dir @name = 'index.html' self.process(@name) self.read_yaml(File.join(base, '_pages'), "#{index_page}.html") self.data['tag'] = tag self.data['items'] = items end