BlogLiterately-diagrams: Include images in blog posts with inline diagrams code
A plugin for
BlogLiterately (http://hackage.haskell.org/package/BlogLiterately) which turns inline diagrams
code into images.
This library also provides an executable,
BlogLiteratelyD, providing a standard instance
BlogLiterately extended with support for
inline diagrams code. For most users it
should suffice to simply use
To use it, include code blocks with the
dia-def class (using pandoc's special extended
or BlogLiterately's extended syntax for tagged
[dia-def] -- This block produces no output but its -- declarations will be in scope in all the -- rest of the diagram blocks. gSq = square 1 # fc green NOTE: Square brackets below should be replaced by curly braces. Haddock chokes on curly braces. Here is a green square: ```[.dia width='200'] dia = gSq ``` Green squares like `gSq`[.dia height='16'] and blue circles like `circle 1 # fc blue`[.dia height='16'] are extremely important.
Note that attributes like width and height can also be specified, but be sure to put the numbers in quotes or else they will not parse properly.
Running this through
replacing square brackets with curly braces)
should result in HTML that looks something like
In addition to simple diagrams,
producing diagrams may also be used. In that
IO action will simply be run, and the
resulting diagram rendered. This can be useful,
for example, when producing a diagram built from
some external data or using randomness.
|Versions||0.1.0.0, 0.1.0.1, 0.1.1, 0.1.1.1, 0.1.1.2, 0.1.2, 0.1.2.1, 0.1.2.2, 0.1.2.3, 0.1.2.4, 0.1.3, 0.1.3.1, 0.1.4, 0.1.4.1, 0.1.4.2, 0.1.4.3, 0.2, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.2.0.6|
|Dependencies||base (>=4.3 && <4.8), BlogLiterately (>=0.6 && <0.8), BlogLiterately-diagrams, containers, diagrams-builder (>=0.5 && <0.7), diagrams-cairo (>=1.0.1 && <1.3), diagrams-lib (>=1.0.1 && <1.3), directory, filepath, pandoc (>=1.9 && <1.14), safe (==0.3.*) [details]|
|Copyright||Copyright 2012 Brent Yorgey|
|Revised||Revision 1 made by BrentYorgey at Wed Aug 27 02:13:42 UTC 2014|
|Source repo||head: git clone git://github.com/byorgey/BlogLiterately-diagrams.git|
|Uploaded||by BrentYorgey at Thu Jun 5 15:49:16 UTC 2014|
|Downloads||9082 total (44 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
|Status||Docs available [build log]
Successful builds reported [all 1 reports]
Hackage Matrix CI
- BlogLiterately-diagrams-0.1.4.3.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees