diff options
Diffstat (limited to 'src/Hakyll/Core/Routes.hs')
-rw-r--r-- | src/Hakyll/Core/Routes.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Routes.hs b/src/Hakyll/Core/Routes.hs index f351447..c4a0db4 100644 --- a/src/Hakyll/Core/Routes.hs +++ b/src/Hakyll/Core/Routes.hs @@ -33,6 +33,7 @@ module Hakyll.Core.Routes , setExtension , matchRoute , customRoute + , constRoute , gsubRoute , composeRoutes ) where @@ -99,6 +100,11 @@ matchRoute pattern (Routes route) = Routes $ \id' -> customRoute :: (Identifier a -> FilePath) -> Routes customRoute f = Routes $ Just . f . castIdentifier +-- | A route that always gives the same result. Obviously, you should only use +-- this for a single compilation rule. +constRoute :: FilePath -> Routes +constRoute = customRoute . const + -- | Create a gsub route -- -- Example: |