~cedric

it's something ¯\_(ツ)_/¯

TIL how to use Markdown inside a custom Liquid tag

September 23, 2020 — Cédric Dekimpe
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}" end end end Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock)

Source : Embedding Markdown in Jekyll HTML