summaryrefslogtreecommitdiff
path: root/src/Hakyll/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Main.hs')
-rw-r--r--src/Hakyll/Main.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Hakyll/Main.hs b/src/Hakyll/Main.hs
new file mode 100644
index 0000000..42b49ae
--- /dev/null
+++ b/src/Hakyll/Main.hs
@@ -0,0 +1,21 @@
+-- | Module providing the main hakyll function and command-line argument parsing
+--
+module Hakyll.Main
+ ( hakyll
+ , hakyllWith
+ ) where
+
+import Hakyll.Core.Configuration
+import Hakyll.Core.Run
+import Hakyll.Core.Rules
+
+-- | This usualy is the function with which the user runs the hakyll compiler
+--
+hakyll :: Rules -> IO ()
+hakyll = run defaultHakyllConfiguration
+
+-- | A variant of 'hakyll' which allows the user to specify a custom
+-- configuration
+--
+hakyllWith :: HakyllConfiguration -> Rules -> IO ()
+hakyllWith = run