Skip to content

Commit 0066080

Browse files
author
kalvinarts
committed
Fixes the unkown 'path' variable or method in Jekyll:Layout and avoids future interference with Jekyll API updates
1 parent d5249e3 commit 0066080

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

lib/jekyll-haml/ext/convertible.rb

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# Re-open Layout class to convert our HAML Layout content.
2-
# This solution risks Jekyll API updates, and potential
3-
# interference from other included plugins.
2+
# This solution redeclares the Layout class in a way that
3+
# don't risks Jekyll API updates anymore.
44

55
module Jekyll
6-
class Layout
7-
def initialize(site, base, name)
8-
@site = site
9-
@base = base
10-
@name = name
11-
12-
self.data = {}
13-
14-
self.process(name)
15-
self.read_yaml(base, name)
16-
self.transform
6+
class << Layout
7+
alias old_initialize initialize
8+
def initialize(*args)
9+
old_initialize(*args)
10+
self.content = self.transform
1711
end
1812
end
1913
end

0 commit comments

Comments
 (0)