You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
370 B

# Wraps text in .lang-fa div
module Farsi
class FarsiTag < Liquid::Block
def render(context)
text = super
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
"<div class='lang-fa'>#{converter.convert(text)}</div>"
end
end
end
Liquid::Template.register_tag('fa', Farsi::FarsiTag)