Add a selection of which source files to process (using the given
glob pattern) to the given remaining
Rules value.
The expanded, relative path of the matched source file on disk
(relative to the project directory configured with
providerDirectory) becomes the identifier under which the
compilation result is saved to the
Store (in case you want to
load it within another rule). See
Identifier for
details.
Examples
Select all markdown files within a directory (but without
subdirectories)
-- Match all Markdown files in the immediate 'posts' directory
-- e.g. '<project-directory>/posts/hakyll.md'
-- but NOT '<project-directory>/posts/haskell/monad.md'
match "posts/*.md" $ do
route $ setExtension "html"
compile pandocCompiler
Select all markdown files within a directory (including
subdirectories recursively)
-- Match all Markdown files in the 'posts' directory and any subdirectory
-- e.g. '<project-directory>/posts/hakyll.md'
-- and '<project-directory>/posts/haskell/monad.md'
match "posts/**.md" $ do
route $ setExtension "html"
compile pandocCompiler
See
Pattern or search "glob patterns" online for more details.
To control where the compilation result will be written out, use
routing functions like
setExtension.