diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-06-17 18:08:46 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-06-17 18:08:46 +0200 |
commit | cd6822ff8b8b23600115bbcaaf086b54395d96e1 (patch) | |
tree | 4a64834c68d088aa48f979ad4e29ba05575855f2 | |
parent | 1ad5314581a65bdf278317840c3e198c2abc7d97 (diff) | |
download | hakyll-cd6822ff8b8b23600115bbcaaf086b54395d96e1.tar.gz |
Force setting of absoluteUrl with custom config.
-rw-r--r-- | src/Text/Hakyll.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Hakyll.hs b/src/Text/Hakyll.hs index 517c68d..f7cb04e 100644 --- a/src/Text/Hakyll.hs +++ b/src/Text/Hakyll.hs @@ -44,9 +44,10 @@ defaultPandocWriterOptions = defaultWriterOptions -- | The default hakyll configuration. -- -defaultHakyllConfiguration :: HakyllConfiguration -defaultHakyllConfiguration = HakyllConfiguration - { absoluteUrl = "" +defaultHakyllConfiguration :: String -- ^ Absolute site URL. + -> HakyllConfiguration -- ^ Default config. +defaultHakyllConfiguration absoluteUrl' = HakyllConfiguration + { absoluteUrl = absoluteUrl' , additionalContext = M.empty , siteDirectory = "_site" , cacheDirectory = "_cache" @@ -64,7 +65,7 @@ hakyll :: String -- ^ Absolute URL of your site. Used in certain cases. -> IO () hakyll absolute = hakyllWithConfiguration configuration where - configuration = defaultHakyllConfiguration { absoluteUrl = absolute } + configuration = defaultHakyllConfiguration absolute -- | Main function to run hakyll with a custom configuration. -- |