From cd6822ff8b8b23600115bbcaaf086b54395d96e1 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Thu, 17 Jun 2010 18:08:46 +0200 Subject: Force setting of absoluteUrl with custom config. --- src/Text/Hakyll.hs | 9 +++++---- 1 file 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. -- -- cgit v1.2.3