hakyll-2.2.2: A simple static site generator library.

Text.Hakyll.HakyllMonad

Description

Module describing the Hakyll monad stack.

Synopsis

Documentation

data HakyllConfiguration Source

Hakyll global configuration type.

Constructors

HakyllConfiguration 

Fields

absoluteUrl :: String

Absolute URL of the site.

additionalContext :: Context

An additional context to use when rendering. This additional context is used globally.

siteDirectory :: FilePath

Directory where the site is placed.

cacheDirectory :: FilePath

Directory for cache files.

enableIndexUrl :: Bool

Enable index links.

pandocParserState :: ParserState

Pandoc parsing options

pandocWriterOptions :: WriterOptions

Pandoc writer options

type Hakyll = ReaderT HakyllConfiguration IOSource

Our custom monad stack.

askHakyll :: (HakyllConfiguration -> a) -> Hakyll aSource

Simplified ask function for the Hakyll monad stack.

Usage would typically be something like:

 doSomething :: a -> b -> Hakyll c
 doSomething arg1 arg2 = do
     siteDirectory' <- askHakyll siteDirectory
     ...