Document XPath funs
This commit is contained in:
19
docs/_plugins/render_block.rb
Normal file
19
docs/_plugins/render_block.rb
Normal file
@ -0,0 +1,19 @@
|
||||
require 'pp'
|
||||
#
|
||||
# Tags to create a complex object inline in JSON.
|
||||
#
|
||||
class RenderBlock < Liquid::Block
|
||||
|
||||
def initialize(tag_name, arg, tokens)
|
||||
super
|
||||
@body = tokens
|
||||
end
|
||||
|
||||
def render(context)
|
||||
template = @body.render(context)
|
||||
pp template
|
||||
pp Liquid::Template.parse(template).render(context)
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('render', RenderBlock)
|
Reference in New Issue
Block a user