Class: Jekyll::Locale::Page
- Inherits:
-
Page
- Object
- Page
- Jekyll::Locale::Page
- Includes:
- Helper
- Defined in:
- lib/jekyll/locale/page.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes included from Helper
Instance Method Summary collapse
-
#initialize(canon, locale) ⇒ Page
constructor
A new instance of Page.
- #template ⇒ Object
- #to_liquid ⇒ Object
Methods included from Helper
#inspect, #permalink, #setup_hreflangs, #setup_hreflangs?
Constructor Details
#initialize(canon, locale) ⇒ Page
Returns a new instance of Page.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jekyll/locale/page.rb', line 8 def initialize(canon, locale) setup(canon, locale) @dir, @name = File.split(relative_path) @base = site.source process(@name) read_yaml(@dir, @name) configure_data # Empty the value as it is not longer required. @dir = "" end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/jekyll/locale/page.rb', line 6 def path @path end |
Instance Method Details
#template ⇒ Object
24 25 26 |
# File 'lib/jekyll/locale/page.rb', line 24 def template @template ||= File.join("", locale, super) end |
#to_liquid ⇒ Object
20 21 22 |
# File 'lib/jekyll/locale/page.rb', line 20 def to_liquid @to_liquid ||= Locale::PageDrop.new(self) end |