diff options
| author | Mark Otto <[email protected]> | 2017-05-28 22:50:57 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-05-29 23:32:28 -0700 |
| commit | 3e76d6565603fafa2c85ad81d7b6345c4e279c72 (patch) | |
| tree | fad0aa6a4a70cafb4a803bd920d6ae2fa44dc466 /_plugins/markdown-block.rb | |
| parent | 32153eb7cba316b873e82cd7b9362c92ca00eddf (diff) | |
| download | bootstrap-3e76d6565603fafa2c85ad81d7b6345c4e279c72.tar.xz bootstrap-3e76d6565603fafa2c85ad81d7b6345c4e279c72.zip | |
Rearrange all the docs to allow for a docs/major.minor/ setup
Diffstat (limited to '_plugins/markdown-block.rb')
| -rw-r--r-- | _plugins/markdown-block.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/_plugins/markdown-block.rb b/_plugins/markdown-block.rb new file mode 100644 index 000000000..f9f1531b5 --- /dev/null +++ b/_plugins/markdown-block.rb @@ -0,0 +1,20 @@ +module Jekyll + class MarkdownBlock < Liquid::Block + alias_method :render_block, :render + + def initialize(tag_name, markup, tokens) + super + end + + # Uses the default Jekyll markdown parser to + # parse the contents of this block + # + def render(context) + site = context.registers[:site] + converter = site.find_converter_instance(::Jekyll::Converters::Markdown) + converter.convert(render_block(context)) + end + end +end + +Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock) |
