18F/18f.gsa.gov

View on GitHub
_plugins/markdown.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Jekyll
  class MarkdownBlock < Liquid::Block
    def initialize(tag_name, text, tokens)
      super
    end
    require 'kramdown'
    def render(context)
      content = super
      Kramdown::Document.new(content).to_html.to_s
    end
  end
end
Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock)