Ignore temp files
This commit is contained in:
parent
59cf230683
commit
7e290bee2f
@ -3,12 +3,15 @@
|
|||||||
import Hakyll
|
import Hakyll
|
||||||
|
|
||||||
import Data.List
|
import Data.List
|
||||||
(isSuffixOf)
|
(isPrefixOf, isSuffixOf)
|
||||||
|
|
||||||
|
import System.FilePath
|
||||||
|
(takeFileName)
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = hakyllWith defaultConfiguration $ do
|
main = hakyllWith defaultConfiguration{ignoreFile = ignore} $ do
|
||||||
match "well-known/*" $ do
|
match "well-known/*" $ do
|
||||||
route (customRoute (prepend '.'. toFilePath))
|
route (customRoute (prepend '.'. toFilePath))
|
||||||
compile copyFileCompiler
|
compile copyFileCompiler
|
||||||
@ -38,6 +41,13 @@ main = hakyllWith defaultConfiguration $ do
|
|||||||
|
|
||||||
|
|
||||||
match "templates/*" $ compile templateBodyCompiler
|
match "templates/*" $ compile templateBodyCompiler
|
||||||
|
where
|
||||||
|
ignore path = any ($ takeFileName path)
|
||||||
|
[ ("." `isPrefixOf`)
|
||||||
|
, ("#" `isPrefixOf`)
|
||||||
|
, ("~" `isSuffixOf`)
|
||||||
|
, (".swp" `isSuffixOf`)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
prepend :: a -> [a] -> [a]
|
prepend :: a -> [a] -> [a]
|
||||||
|
Loading…
Reference in New Issue
Block a user