Class: Jekyll::Podcast::TagPageGenerator::TagPage
- Inherits:
-
Jekyll::Page
- Object
- Jekyll::Page
- Jekyll::Podcast::TagPageGenerator::TagPage
- Defined in:
- lib/jekyll/podcast/tag_page_generator.rb
Overview
Represents a tag page; includes pagination information
Instance Method Summary collapse
-
#initialize(site, tag) ⇒ TagPage
constructor
A new instance of TagPage.
- #pagination(site) ⇒ Object
Constructor Details
#initialize(site, tag) ⇒ TagPage
Returns a new instance of TagPage.
18 19 20 21 22 23 24 25 26 |
# File 'lib/jekyll/podcast/tag_page_generator.rb', line 18 def initialize(site, tag) super(site, site.baseurl, '/', 'index.html') @tag = tag @data ||= {} @data['permalink'] = Jekyll::Podcast::TagPageGenerator.permalink(@tag, site) @data['layout'] = 'tag-page' @data['title'] = tag @data['pagination'] = pagination(site) end |
Instance Method Details
#pagination(site) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/jekyll/podcast/tag_page_generator.rb', line 28 def pagination(site) pagination_config = site.config.dig('tag_pages', 'pagination') || {} { 'enabled' => true, 'tag' => @tag, 'sort_reverse' => false }.merge(pagination_config) end |