2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Rearrange all the docs to allow for a docs/major.minor/ setup

This commit is contained in:
Mark Otto
2017-05-28 22:50:57 -07:00
committed by Mark Otto
parent 32153eb7cb
commit 3e76d65656
231 changed files with 40 additions and 15412 deletions
+28
View File
@@ -0,0 +1,28 @@
# 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)