Skip to content

Commit e0d3d0a

Browse files
author
kalvinarts
committed
Avoid future interference with Jekyll API updates
1 parent d5249e3 commit e0d3d0a

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

lib/jekyll-haml/ext/convertible.rb

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
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 don't risks Jekyll API updates anymore.
43

54
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
5+
class << Layout # Redeclare a copy of the Layout class
6+
alias old_initialize initialize
7+
def initialize(*args)
8+
old_initialize(*args)
9+
self.content = self.transform
1710
end
1811
end
1912
end

0 commit comments

Comments
 (0)