Skip to content

Instantly share code, notes, and snippets.

@mildred
Created December 13, 2011 15:55
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mildred/1472645 to your computer and use it in GitHub Desktop.
Save mildred/1472645 to your computer and use it in GitHub Desktop.
Jekyll plugin to have layouts transformed by Converters as well, taken from https://github.com/mojombo/jekyll/pull/351
module Jekyll
class Layout
alias old_initialize initialize
def initialize(*args)
old_initialize(*args)
self.transform
end
end
end
@ValeryVS
Copy link

replace

self.transform

with

self.content = self.transform
self.content

on jekyll 2.3+
jekyll/jekyll#2961 (comment)

@matthiasbeyer
Copy link

I get:

jekyll 2.5.3 | Error:  undefined local variable or method `path' for #<Jekyll::Layout:0x00000000b803a8>

With this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment