Class: Jekyll::Locale::Page

Inherits:
Page
  • Object
show all
Includes:
Helper
Defined in:
lib/jekyll/locale/page.rb

Direct Known Subclasses

AutoPage

Instance Attribute Summary collapse

Attributes included from Helper

#canon, #relative_path

Instance Method Summary collapse

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

#pathObject (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

#templateObject



24
25
26
# File 'lib/jekyll/locale/page.rb', line 24

def template
  @template ||= File.join("", locale, super)
end

#to_liquidObject



20
21
22
# File 'lib/jekyll/locale/page.rb', line 20

def to_liquid
  @to_liquid ||= Locale::PageDrop.new(self)
end