diff --git a/site/app/site.hs b/site/app/site.hs index d7d712b..161c89e 100644 --- a/site/app/site.hs +++ b/site/app/site.hs @@ -3,12 +3,15 @@ import Hakyll import Data.List - (isSuffixOf) + (isPrefixOf, isSuffixOf) + +import System.FilePath + (takeFileName) -------------------------------------------------------------------------------- main :: IO () -main = hakyllWith defaultConfiguration $ do +main = hakyllWith defaultConfiguration{ignoreFile = ignore} $ do match "well-known/*" $ do route (customRoute (prepend '.'. toFilePath)) compile copyFileCompiler @@ -38,6 +41,13 @@ main = hakyllWith defaultConfiguration $ do match "templates/*" $ compile templateBodyCompiler + where + ignore path = any ($ takeFileName path) + [ ("." `isPrefixOf`) + , ("#" `isPrefixOf`) + , ("~" `isSuffixOf`) + , (".swp" `isSuffixOf`) + ] prepend :: a -> [a] -> [a]