This module provides a declarative DSL in which the user can specify the different rules used to run the compilers.
The convention is to just list all items in the
Rules monad, routes and
A typical usage example would be:
main = hakyll $ do match "posts/*" $ do route (setExtension "html") compile someCompiler match "css/*" $ do route idRoute compile compressCssCompiler
- data Rules a
- match :: Pattern -> Rules () -> Rules ()
- matchMetadata :: Pattern -> (Metadata -> Bool) -> Rules () -> Rules ()
- create :: [Identifier] -> Rules () -> Rules ()
- version :: String -> Rules () -> Rules ()
- compile :: (Binary a, Typeable a, Writable a) => Compiler (Item a) -> Rules ()
- route :: Routes -> Rules ()
- preprocess :: IO a -> Rules a
- data Dependency
- rulesExtraDependencies :: [Dependency] -> Rules a -> Rules a
The monad used to compose rules
Add a compilation rule to the rules.
This instructs all resources to be compiled using the given compiler.
Add a route.
This adds a route for all items matching the current pattern.
IO action immediately while the rules are being evaluated.
This should be avoided if possible, but occasionally comes in useful.