Sha256: 07b8d2a6e1aa43b9b971e54cfa593849e6796045035111705a21ac054ff4b959

Contents?: true

Size: 556 Bytes

Versions: 5

Compression:

Stored size: 556 Bytes

Contents

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
middleman-more-3.0.0.alpha.7 lib/middleman-more/renderers/liquid.rb
middleman-3.0.0.alpha.6 lib/middleman/renderers/liquid.rb
middleman-3.0.0.alpha.5 lib/middleman/renderers/liquid.rb
middleman-3.0.0.alpha.4 lib/middleman/renderers/liquid.rb
middleman-3.0.0.alpha.3 lib/middleman/renderers/liquid.rb