Open Nowaker opened 5 years ago
This code isn't friendly for monkey-patching:
Jekyll::Hooks.register :site, :pre_render do |site, payload| # non # monkeypatch-friendly # code # here... # :-( end
This one is:
def pre_render site, payload # monkey-patching friendly code here, yay! end Jekyll::Hooks.register :site, :pre_render do |site, payload| pre_render end
This is just one example of how this cane be achieved. A top-level def method is one option, a def self class method, and probably more.
Thanks!
This code isn't friendly for monkey-patching:
This one is:
This is just one example of how this cane be achieved. A top-level def method is one option, a def self class method, and probably more.
Thanks!