Module: MarkdownHelper
- Defined in:
- lib/generators/frozen/templates/md/helpers/markdown_helper.rb
Instance Method Summary collapse
Instance Method Details
#pages_image_tag(path, **kwargs) ⇒ Object
11 12 13 |
# File 'lib/generators/frozen/templates/md/helpers/markdown_helper.rb', line 11 def pages_image_tag(path, **kwargs) image_tag "pages/#{@page.slug}/#{path}", **kwargs end |
#render_content_from(page) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/frozen/templates/md/helpers/markdown_helper.rb', line 2 def render_content_from(page) erb_processed_content = render(inline: page.content, layout: false) Kramdown::Document.new( erb_processed_content, input: "GFM", syntax_highlighter: :rouge ).to_html.html_safe end |