Carpe diem (Felix's blog)

I am a happy developer

Jekyll/Octopress Graphviz Plugin

I created a graphviz plugin for Octopress/Jekyll today. For example:

{% graphviz %}
digraph G {
  subgraph cluster0 {
  a -> b;
  a -> c;
  b -> d;
  c -> d;
  subgraph cluster1 {
  e -> g;
  e -> f;
  b -> f [lhead=cluster1];
  d -> e;
  c -> g [ltail=cluster0, lhead=cluster1];
  c -> e [ltail=cluster0];
  d -> h;
{% endgraphviz %}

will produce:

You can see how it works on real post:

  1. Practical Software Verification Using SPIN
  2. Recursion Best Practices


  1. Download the file from here.
  2. Put it into your my_octopress/plugin folder.
  3. Add one line source/images/graphviz into your .gitignore file

Remeber that you should have graphviz installed in your system. Else it will raise an error.