私もこれを探していました、それはそれを行う方法を発見するPITAであり、Googleのコンテンツはあまりありませんでした。最も正確な発見は、ここでは機能しない要点でした...非常に単純な解決策:
./_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)
更新: 使用例のブログ: https://web.archive.org/web/20161207125751/http://wolfslittlestore.be/2013/10/rendering-markdown-in-jekyll/