diff options
| author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-07-31 12:55:41 +0200 |
|---|---|---|
| committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-07-31 12:55:41 +0200 |
| commit | 1af0421efe7983eb5634440ec162da48518b0b78 (patch) | |
| tree | 8de21251088371bb50b8933ae1b92f64f52873a7 /src/Text/Hakyll | |
| parent | 48b170601fce10df82141208b70aa5c459d4b463 (diff) | |
| download | hakyll-1af0421efe7983eb5634440ec162da48518b0b78.tar.gz | |
Option to choose between preview modes
Diffstat (limited to 'src/Text/Hakyll')
| -rw-r--r-- | src/Text/Hakyll/HakyllMonad.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Text/Hakyll/HakyllMonad.hs b/src/Text/Hakyll/HakyllMonad.hs index 9535a66..f17ae52 100644 --- a/src/Text/Hakyll/HakyllMonad.hs +++ b/src/Text/Hakyll/HakyllMonad.hs @@ -1,6 +1,7 @@ -- | Module describing the Hakyll monad stack. module Text.Hakyll.HakyllMonad ( HakyllConfiguration (..) + , PreviewMode (..) , Hakyll , askHakyll , getAdditionalContext @@ -15,9 +16,17 @@ import Text.Pandoc (ParserState, WriterOptions) import Text.Hakyll.Context (Context (..)) -- | Our custom monad stack. +-- type Hakyll = ReaderT HakyllConfiguration IO +-- | Preview mode. +-- +data PreviewMode = BuildOnRequest + | BuildOnInterval + deriving (Show, Eq, Ord) + -- | Hakyll global configuration type. +-- data HakyllConfiguration = HakyllConfiguration { -- | Absolute URL of the site. absoluteUrl :: String @@ -30,6 +39,8 @@ data HakyllConfiguration = HakyllConfiguration cacheDirectory :: FilePath , -- | Enable index links. enableIndexUrl :: Bool + , -- | The preview mode used + previewMode :: PreviewMode , -- | Pandoc parsing options pandocParserState :: ParserState , -- | Pandoc writer options |
