I also searched for this, it was PITA, discovering how to do it, not so much Google content, the most accurate discovery was an entity that would not work here ... a dead simple solution:
./_plugins/markdown_tag.rb :
module Jekyll class MarkdownTag < Liquid::Tag def initialize(tag_name, text, tokens) super @text = text.strip end require "kramdown" def render(context) tmpl = File.read File.join Dir.pwd, "_includes", @text Jekyll::Converters::Markdown::KramdownParser.new(Jekyll.configuration()).convert(tmpl) end end end Liquid::Template.register_tag('markdown', Jekyll::MarkdownTag)
UPDATE: example usage blog: http://wolfslittlestore.be/2013/10/10/rendering-markdown-in-jekyll/
Breno Salgado Jan 09 '13 at 22:05 2013-01-09 22:05
source share