@@ -2,6 +2,7 @@
3module Hakyll.Core.Configuration
3module Hakyll.Core.Configuration
4 ( HakyllConfiguration (..)
4 ( HakyllConfiguration (..)
5 , defaultHakyllConfiguration
6 , defaultHakyllConfiguration
@@ -23,6 +24,10 @@ data HakyllConfiguration = HakyllConfiguration
24 -- * files ending with @.swp@
25 -- * files ending with @.swp@
27+ -- Note that the files in @destinationDirectory@ and @storeDirectory@ will
28+ -- also be ignored. Note that this is the configuration parameter, if you
29+ -- want to use the test, you should use @shouldIgnoreFile@.
26 ignoreFile :: FilePath -> Bool
31 ignoreFile :: FilePath -> Bool
@@ -42,3 +47,11 @@ defaultHakyllConfiguration = HakyllConfiguration
42 | otherwise = False
47 | otherwise = False
44 fileName = takeFileName path
49 fileName = takeFileName path
51+-- | Check if a file should be ignored
53+shouldIgnoreFile :: HakyllConfiguration -> FilePath -> Bool
54+shouldIgnoreFile conf path =
55+ destinationDirectory conf `isPrefixOf` path ||
56+ storeDirectory conf `isPrefixOf` path ||