fix the path splitting issue for directory exclusion

This commit is contained in:
Mirek Kratochvil 2023-06-22 13:09:02 +02:00
parent 2ea84315db
commit 2c792ff967

View file

@ -56,7 +56,7 @@ isSourceablePath :: FilePath -> Site Bool
isSourceablePath fp = do
notSource <- use notSourceDirs
pure $ (&&) <$> hasSuffix ".md" . last <*> not . any (`elem` notSource) . init $
splitPath fp
splitDirectories fp
-- | Load the pages from a directory and add them to `pages`.
sourcePages :: FilePath -> Site ()