a Octopress (or Jekyll) plugin which convert a graphviz source code to a svg element with an alternative text for HTML5.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
graphviz_block.rb

README.md

Jekyll/Octopress Graphviz Plugin

a Jekyll/Octopress plugin which convert a graphviz source code to a svg element with an alternative text for HTML5.

Example

if you write:

{% graph non-directed graph %}
a -- b
b -- c
c -- a
{% endgraph %}

then it's converted to:

<svg role="img" aria-label="non-directed graph" width="89pt" height="188pt" viewBox="0.00 0.00 89.00 188.00">
<title>non-directed graph</title>
<desc>graph "non-directed graph" { 
a -- b
b -- c
c -- a
}</desc>
 
<g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 184)">
 
 ...

</g>
</svg>

a graphviz result

Installation

In your terminal:

cd <your_octopress>/plugins
wget https://raw.github.com/kui/octopress-graphviz/master/graphviz_block.rb