hakyll-diagrams
LicenseBSD-3-Clause
MaintainerRenato Garcia
Safe HaskellNone
LanguageHaskell2010

Hakyll.Web.Pandoc.Diagrams

Description

 
Synopsis

Documentation

drawDiagramsWith :: Options -> Pandoc -> Compiler Pandoc #

Render the code inside all CodeBlock with a .diagram class to either a RawBlock or an Image (depending on if we have received an attribute with a path to an external file), where these two can or cannot be within a parent Figure (depending on if we have received an attribute with a figure caption).

The hint library is used to interpret the Haskell code, and therefore all of its limitations will apply here as well. In particular, if there isn't a .ghc.environment.<something> package environment file (as generated by cabal --write-ghc-environment-files=always option), setting either HAKYLL_DIAGRAMS_PACKAGE_ENV (a single path) or HAKYLL_DIAGRAMS_PACKAGE_DB (N comma-separated paths) environment variables may be required. If these environment variables are defined, their values will be used to set the GHC -package-env and -package-db options respectively.

data Options #

Configure the interpreter environment used when rendering the diagrams.

This is controlled via 'type Options'.

Constructors

Options 

Fields

Instances

Instances details
Show Options # 
Instance details

Defined in Hakyll.Web.Pandoc.Diagrams

Default Options # 
Instance details

Defined in Hakyll.Web.Pandoc.Diagrams

Methods

def :: Options #

Eq Options # 
Instance details

Defined in Hakyll.Web.Pandoc.Diagrams

Methods

(==) :: Options -> Options -> Bool #

(/=) :: Options -> Options -> Bool #

defaultOptions :: Options #

The default value will import Prelude, Diagrams.Prelude, and Diagrams.Backend.SVG global modules. All other fields will be emtpty.

readOptionsFromMetadataWith #

Arguments

:: Options

The base Options which will be modified by the metadata values

-> Compiler Options

The resulting modified Options

Read the Options values from metadata block.

---
dg.localModules: Utils, Commons as Cm
dg.searchPaths: lib, ..., posts
dg.languageExtensions: ""
---

Each field must be prefixed with a dg. string and must be formatted as a list where each element is separated by a comma (,).

Any occurrence of an ellipsis (...) will be replaced by the current value of that field as in the Options first argument. So to append one element at the end of a list, we can do: "..., element".

When setting either globalModules or localModules, a value like "Utils" will translate to ("Utils", Nothing), an unqualified import. A value like "Commons as Cm" will translate to ("Commons", Just "Cm"), a qualified import.

Any field not present will retain the same value as in the base Options. An empty string "" will set the field to an empty list.