Class: Bridgetown::Converters::SerbeaTemplates
- Inherits:
-
Converter
- Object
- Converter
- Bridgetown::Converters::SerbeaTemplates
- Defined in:
- lib/serbea/bridgetown_support.rb
Instance Method Summary collapse
-
#convert(content, convertible) ⇒ String
Logic to do the Serbea content conversion.
Instance Method Details
#convert(content, convertible) ⇒ String
Logic to do the Serbea content conversion.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/serbea/bridgetown_support.rb', line 41 def convert(content, convertible) serb_view = Bridgetown::SerbeaView.new(convertible) serb_renderer = Tilt::SerbeaTemplate.new(convertible.relative_path) { content } if convertible.is_a?(Bridgetown::Layout) serb_renderer.render(serb_view) do convertible.current_document_output end else serb_renderer.render(serb_view) end end |