module ThoughtTagger
class ThoughtTag < Liquid::Tag
def initialize(tag_name, markup, tokens)
@markup = markup
super
end
def render(context)
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
result = "
#{converter.convert(@markup).strip}
"
end
end
end
Liquid::Template.register_tag('thought', ThoughtTagger::ThoughtTag)
module NoteTagger
class NoteTag < Liquid::Tag
def initialize(tag_name, markup, tokens)
@markup = markup
super
end
def render(context)
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
markup = converter.convert(@markup).strip[3..-1]
result = ""
result << "
Note: #{markup}
"
end
end
end
Liquid::Template.register_tag('note', NoteTagger::NoteTag)