summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Hakyll.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Text/Hakyll.hs b/src/Text/Hakyll.hs
index 5c2fbd5..c0486e7 100644
--- a/src/Text/Hakyll.hs
+++ b/src/Text/Hakyll.hs
@@ -1,6 +1,7 @@
module Text.Hakyll
( defaultHakyllConfiguration
, hakyll
+ , hakyllWithConfiguration
) where
import Control.Monad.Reader (runReaderT)
@@ -18,9 +19,13 @@ defaultHakyllConfiguration = HakyllConfiguration
{ additionalContext = M.empty
}
--- | Main function to run hakyll.
-hakyll :: HakyllConfiguration -> Hakyll () -> IO ()
-hakyll configuration buildFunction = do
+-- | Hakyll with a default configuration.
+hakyll :: Hakyll () -> IO ()
+hakyll = hakyllWithConfiguration defaultHakyllConfiguration
+
+-- | Main function to run hakyll with a configuration.
+hakyllWithConfiguration :: HakyllConfiguration -> Hakyll () -> IO ()
+hakyllWithConfiguration configuration buildFunction = do
args <- getArgs
case args of ["build"] -> build'
["clean"] -> clean