Class: Jekyll::CollectionPages::TagPage
- Inherits:
-
PageWithoutAFile
- Object
- PageWithoutAFile
- Jekyll::CollectionPages::TagPage
- Defined in:
- lib/jekyll/collection_pages/tag_page.rb
Instance Method Summary collapse
-
#initialize(site, attributes) ⇒ TagPage
constructor
A new instance of TagPage.
Constructor Details
#initialize(site, attributes) ⇒ TagPage
Returns a new instance of TagPage.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/jekyll/collection_pages/tag_page.rb', line 6 def initialize(site, attributes) dir = attributes[:dir] name = attributes[:name] tag = attributes[:tag] title = attributes[:title] layout = attributes[:layout] posts = attributes[:posts] page_num = attributes[:page_num] paginator = attributes[:paginator] # This sets up a page that has no source file on disk. super(site, site.source, dir, name) # also calls process(name) internally self.content = '' # virtual page body (optional) self.data = { 'layout' => layout, # layout NAME (relative path, no _layouts prefix) 'tag' => tag.to_s, 'title' => title.to_s, 'posts' => posts, 'page_num' => page_num } data['paginator'] = paginator if paginator end |