11 def render_liquid page, content
12 liquid self.body, content, page, binding
16 # Render a page's liquid and return the intermediate result
17 def liquid template, content, page, binding = TOPLEVEL_BINDING
19 Liquid::Template.file_system = Liquid::LocalFileSystem.new(File.join(File.dirname(Rake.application().rakefile), "_includes"))
20 unless defined? @liquid_template
21 @liquid_template = Liquid::Template.parse(template)
25 vars["content"] = content
27 vars["site"] = site.config.h.clone
29 site.pages.each do |f, p|
30 pages[f] = p.config.h.clone
31 pages[f]["url"] = p.url
33 vars["site"]["pages"] = pages
35 vars["page"] = page.config.h.clone
36 vars["page"]["url"] = page.url
38 @liquid_template.render(vars)