Describes the base structure for the project, as well as some basic functions. TODO: everything really...
18 lines
508 B
Haskell
18 lines
508 B
Haskell
module Core.Routers
|
|
( (>+)
|
|
, moveFromTo
|
|
, moveFromToWithExtension
|
|
) where
|
|
|
|
import Data.Char ( toLower )
|
|
import Hakyll
|
|
|
|
(>+) :: Routes -> Routes -> Routes
|
|
(>+) = composeRoutes
|
|
|
|
moveFromTo :: FilePath -> FilePath -> Routes
|
|
moveFromTo from to =
|
|
gsubRoute from (const to) >+ customRoute (fmap toLower . toFilePath)
|
|
|
|
moveFromToWithExtension :: FilePath -> FilePath -> String -> Routes
|
|
moveFromToWithExtension from to ext = moveFromTo from to >+ setExtension ext
|