hakyll-2.4.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.

previewMode :: PreviewMode

The preview mode used

pandocParserState :: ParserState

Pandoc parsing options

pandocWriterOptions :: WriterOptions

Pandoc writer options

hamletSettings :: HamletSettings

Hamlet settings (if you use hamlet for templates)

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
     ...

getAdditionalContext :: HakyllConfiguration -> ContextSource

Obtain the globally available, additional context.

logHakyll :: String -> Hakyll ()Source

Write some log information.

forkHakyllWait :: Hakyll () -> Hakyll (MVar ())Source

Perform a concurrent hakyll action. Returns an MVar you can wait on

concurrentHakyll :: [Hakyll ()] -> Hakyll ()Source

Perform a number of concurrent hakyll actions, and waits for them to finish