aboutsummaryrefslogtreecommitdiff
path: root/_plugins
diff options
context:
space:
mode:
authorm5o <[email protected]>2018-01-16 00:49:36 +0200
committerXhmikosR <[email protected]>2018-03-12 21:50:21 +0200
commitb5e6eb22a6da98c489c00e6266daa4599e3ce097 (patch)
treeca46ac63204c54c0e6c63a78f33f2a2262d82ac3 /_plugins
parent7b2427cc6b790b2b66dee32ba55b8fa694b789e2 (diff)
downloadbootstrap-b5e6eb22a6da98c489c00e6266daa4599e3ce097.tar.xz
bootstrap-b5e6eb22a6da98c489c00e6266daa4599e3ce097.zip
Use callout without custom Jekyll plugin.
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/callout.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/_plugins/callout.rb b/_plugins/callout.rb
deleted file mode 100644
index 58453ecb4..000000000
--- a/_plugins/callout.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# Source: https://stackoverflow.com/questions/19169849/how-to-get-markdown-processed-content-in-jekyll-tag-plugin
-
-module Jekyll
- module Tags
- class CalloutTag < Liquid::Block
-
- def initialize(tag_name, type, tokens)
- super
- type.strip!
- if %w(info danger warning).include?(type)
- @type = type
- else
- puts "#{type} callout not supported. Defaulting to info"
- @type = "info"
- end
- end
-
- def render(context)
- site = context.registers[:site]
- converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
- output = converter.convert(super(context))
- "<div class=\"bd-callout bd-callout-#{@type}\">#{output}</div>"
- end
- end
- end
-end
-
-Liquid::Template.register_tag('callout', Jekyll::Tags::CalloutTag)