module Jekyll class AdmonitionMarkdownBlock < Liquid::Block @type = "" def initialize(tag_name, text, tokens) super @type = text end require "redcarpet" def render(context) content = super '
' + @type + '
' + Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(content) + '
' end end end Liquid::Template.register_tag('admonition_md', Jekyll::AdmonitionMarkdownBlock)