Class: Jekyll::Plugins::PaginateV3::Pagination::Pages::ShadowPage
- Inherits:
-
Page
- Object
- Jekyll::Page
- Page
- Jekyll::Plugins::PaginateV3::Pagination::Pages::ShadowPage
- Defined in:
- lib/jekyll-paginate-v3/pagination/pages/shadow_page.rb
Overview
In-memory index page that behaves like a page while exposing collection metadata for compatibility checks.
Used by Pagination::Model when emitting collection: shadow indexes.
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Attributes inherited from Page
Instance Method Summary collapse
-
#initialize(template_item, current_page, total_pages, index_filename, collection:) ⇒ ShadowPage
constructor
Mirrors
Pagegeneration but publishes collection metadata without becoming a true collection document.
Constructor Details
#initialize(template_item, current_page, total_pages, index_filename, collection:) ⇒ ShadowPage
Mirrors Page generation but publishes collection metadata without
becoming a true collection document.
19 20 21 22 23 24 25 |
# File 'lib/jekyll-paginate-v3/pagination/pages/shadow_page.rb', line 19 def initialize(template_item, current_page, total_pages, index_filename, collection:) super(template_item, current_page, total_pages, index_filename) @collection = collection return if @collection.nil? self.data['collection'] = @collection.label.to_s end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
15 16 17 |
# File 'lib/jekyll-paginate-v3/pagination/pages/shadow_page.rb', line 15 def collection @collection end |