Skip to main content

Ralsina.Me — Roberto Alsina's website

Lunchtime Nikola Feature: graphviz

Since we are in the process of adding a plug­in re­po for Niko­la, I want­ed ­to add a sim­ple plug­in there so that we can show how it work­s.

So here it is. You use this:

.. graphviz::

   digraph foo {
       "Idea" -> "tap tap tap" -> "Code";
   }

And you get (as­sum­ing graphviz is in­stalled, and this plug­in is in­stalled, etc.) this:

b'\nn "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n\n\n\n\nfoo\n\n\n\nIdea\n\nIdea\n\n\n\ntap tap tap\n\ntap tap tap\n\n\n\nIdea->tap tap tap\n\n\n\n\n\nCode\n\nCode\n\n\n\ntap tap tap->Code\n\n\n\n\n\n'

It's still very rudi­men­ta­ry, but it aims to be com­pat­i­ble with Sphinx's im­ple­men­ta­tion even though the de­tails of how it's done vary great­ly.

Comments

Comments powered by Disqus