on master help sign in
Force setting of absoluteUrl with custom config.
cd6822fJasper Van der Jeugt
src/Text/Hakyll.hs+5−4
@@ -44,9 +44,10 @@ defaultPandocWriterOptions = defaultWriterOptions
44
44
45-- | The default hakyll configuration.
45-- | The default hakyll configuration.
46--
46--
47−defaultHakyllConfiguration :: HakyllConfiguration
47+defaultHakyllConfiguration :: String -- ^ Absolute site URL.
48+ -> HakyllConfiguration -- ^ Default config.
48−defaultHakyllConfiguration = HakyllConfiguration
49+defaultHakyllConfiguration absoluteUrl' = HakyllConfiguration
49− { absoluteUrl = ""
50+ { absoluteUrl = absoluteUrl'
50 , additionalContext = M.empty
51 , additionalContext = M.empty
51 , siteDirectory = "_site"
52 , siteDirectory = "_site"
52 , cacheDirectory = "_cache"
53 , cacheDirectory = "_cache"
@@ -64,7 +65,7 @@ hakyll :: String -- ^ Absolute URL of your site. Used in certain cases.
64 -> IO ()
65 -> IO ()
65hakyll absolute = hakyllWithConfiguration configuration
66hakyll absolute = hakyllWithConfiguration configuration
66 where
67 where
67− configuration = defaultHakyllConfiguration { absoluteUrl = absolute }
68+ configuration = defaultHakyllConfiguration absolute
68
69
69-- | Main function to run hakyll with a custom configuration.
70-- | Main function to run hakyll with a custom configuration.
70--
71--