module Bridgetown::LiquidRenderable
Public Instance Methods
liquid_engine_configured?()
click to toggle source
# File lib/bridgetown-core/concerns/liquid_renderable.rb, line 16 def liquid_engine_configured? data["template_engine"] == "liquid" || ( data["template_engine"].nil? && ( site.config[:template_engine].nil? || site.config[:template_engine] == "liquid" ) ) end
render_with_liquid?()
click to toggle source
Determine whether the file should be rendered with Liquid.
Returns false if the document is a yaml file or if the document doesn't contain any Liquid Tags
or Variables, true otherwise.
# File lib/bridgetown-core/concerns/liquid_renderable.rb, line 9 def render_with_liquid? return false if data["render_with_liquid"] == false return false unless liquid_engine_configured? !(yaml_file? || !Utils.has_liquid_construct?(content)) end
Private Instance Methods
yaml_file?()
click to toggle source
Override in individual classes
# File lib/bridgetown-core/concerns/liquid_renderable.rb, line 26 def yaml_file? false end