Class: Jekyll::ConvertiblePage
- Inherits:
-
Object
- Object
- Jekyll::ConvertiblePage
- Includes:
- Convertible
- Defined in:
- lib/jekyll-liquid-plus/tags/include.rb
Overview
Create a new page class to allow partials to trigger Jekyll Page Hooks.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#data ⇒ Object
Returns the value of attribute data.
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output ⇒ Object
Returns the value of attribute output.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize(site, name, content) ⇒ ConvertiblePage
constructor
A new instance of ConvertiblePage.
- #render(payload) ⇒ Object
Constructor Details
#initialize(site, name, content) ⇒ ConvertiblePage
Returns a new instance of ConvertiblePage.
12 13 14 15 16 17 18 19 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 12 def initialize(site, name, content) @site = site @name = name @ext = File.extname(name) @content = content @data = { layout: "no_layout" } # hack end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def content @content end |
#data ⇒ Object
Returns the value of attribute data.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def data @data end |
#ext ⇒ Object
Returns the value of attribute ext.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def ext @ext end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def name @name end |
#output ⇒ Object
Returns the value of attribute output.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def output @output end |
#site ⇒ Object
Returns the value of attribute site.
10 11 12 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 10 def site @site end |
Instance Method Details
#render(payload) ⇒ Object
21 22 23 |
# File 'lib/jekyll-liquid-plus/tags/include.rb', line 21 def render(payload) do_layout(payload, { no_layout: nil }) end |