1
0
Fork 0

Only replace blog posts if not there

main
Bill Ewanick 2023-04-16 15:14:01 -04:00
parent d9b6aed2b9
commit 4142b65a86
1 changed files with 2 additions and 3 deletions

View File

@ -126,9 +126,8 @@ allBlogPosts config = map f zippedDates
writeToFile :: Config -> (FilePath, Text) -> IO()
writeToFile config (fp, txt) = do
-- fileExists <- doesFileExist fp'
-- unless fileExists (write fp' txt)
write fp' txt
fileExists <- doesFileExist fp'
unless fileExists (write fp' txt)
where
write = TIO.writeFile
fp' = postsOutputPath config <> "/" <> fp