jekyll-mermaid 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/jekyll-mermaid.rb +16 -0
  2. metadata +47 -0
@@ -0,0 +1,16 @@
1
+ module Jekyll
2
+ class Mermaid < Liquid::Block
3
+
4
+ def initialize(tag_name, markup, tokens)
5
+ super
6
+ end
7
+
8
+ def render(context)
9
+ @config = context.registers[:site].config['mermaid']
10
+ "<script src=\"#{@config['src']}\"></script>"\
11
+ "<div class=\"mermaid\">#{super}</div>"
12
+ end
13
+ end
14
+ end
15
+
16
+ Liquid::Template.register_tag('mermaid', Jekyll::Mermaid)
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-mermaid
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jason Bellamy
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-12-19 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A Jekyll plugin to simplify the creation of mermaid diagrams and flowcharts
15
+ in your posts and pages.
16
+ email: j@sonbellamy.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/jekyll-mermaid.rb
22
+ homepage: https://github.com/jasonbellamy/jekyll-mermaid
23
+ licenses:
24
+ - MIT
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 1.8.11
44
+ signing_key:
45
+ specification_version: 3
46
+ summary: A Jekyll plugin for mermaid.
47
+ test_files: []