1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/lib/middleman/renderers/liquid.rb
2011-11-20 21:21:19 -08:00

21 lines
No EOL
556 B
Ruby

module Middleman::Renderers::Liquid
class << self
def registered(app)
# Liquid is not included in the default gems,
# but we'll support it if available.
begin
require "liquid"
app.after_configuration do
Liquid::Template.file_system = Liquid::LocalFileSystem.new(source_dir)
provides_metadata %r{\.liquid$} do |path|
{ :locals => { :data => data.to_h } }
end
end
rescue LoadError
end
end
alias :included :registered
end
end