hakyll-diagrams

hakyll-diagrams

Compiles any Haskell diagrams code embedded in input source files (Markdown, reStructuredText, etc.), replacing them with the rendered diagrams figures in the generated HTML output. The diagrams figures can be inlined as SVG code or referenced as external .svg image files using <img> tags.

For example, when processing a Markdown input source file, a code block like this:

``` diagram { svg:width=300 }
let
  target = mconcat
    [ circle 1 # lw 0 # fc red
    , circle 2 # lw 0 # fc white
    , circle 3 # lw 0 # fc red
    ]

  background = roundedRect 8 8 0.1
    # lw 0
    # fc (sRGB24read "#808080")
    # opacity 0.15

in target <> background
```

will be replaced in the resulting HTML page by this figure:

A thoughtful documentation with usage examples and results can be found at the project repository.

Modules

hakyll-diagrams-0.1.0.0