summaryrefslogtreecommitdiff
path: root/src/_plugins/html-markdown.rb
diff options
context:
space:
mode:
Diffstat (limited to 'src/_plugins/html-markdown.rb')
-rw-r--r--src/_plugins/html-markdown.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/_plugins/html-markdown.rb b/src/_plugins/html-markdown.rb
new file mode 100644
index 0000000..7d60137
--- /dev/null
+++ b/src/_plugins/html-markdown.rb
@@ -0,0 +1,17 @@
+module Jekyll
+ class MarkdownBlock < Liquid::Block
+ def initialize(tag_name, text, tokens)
+ super
+ end
+
+ require "redcarpet"
+
+ def render(context)
+ content = super
+
+ "#{Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(content)}"
+ end
+ end
+end
+
+Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock)