Class: Overrides::OverridePage

Inherits:
Jekyll::Page
  • Object
show all
Defined in:
lib/jekyll/overrides.rb

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, name) ⇒ OverridePage

Returns a new instance of OverridePage.



3
4
5
6
# File 'lib/jekyll/overrides.rb', line 3

def initialize(site, base, dir, name)
    @override_path = File.join(Dir.pwd, base, name)
    super(site, base, dir, name)
end

Instance Method Details

#read_yaml(base, name, opts = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/jekyll/overrides.rb', line 8

def read_yaml(base, name, opts = {})
    path = @path
    # We temporarily replace the path here where super.read_yaml doesn't fail
    @path = @override_path
    super
    @path = path
end