1 # A simple way to inspect liquid template variables.
3 # Can be used anywhere liquid syntax is parsed (templates, includes, posts/pages)
5 # {{ site.posts | debug }}
9 # Need to overwrite the inspect method here because the original
10 # uses < > to encapsulate the psuedo post/page objects in which case
11 # the output is taken for HTML tags and hidden from view.
15 "#Jekyll:Post @id=#{self.id.inspect}"
21 "#Jekyll:Page @name=#{self.name.inspect}"
30 def debug(obj, stdout=false)
31 puts obj.pretty_inspect if stdout
32 "<pre>#{obj.class}\n#{obj.pretty_inspect}</pre>"
38 Liquid::Template.register_filter(Jekyll::DebugFilter)