mapM_ (createDirectoryIfMissing True . takeDirectory . unpack . fst) $ getEntryPages project
mapM_ (\x -> writeFile (unpack $ fst x) (unpack $ snd x)) $ getEntryPages project
writeFile "build/index.html" $ unpack $ toStrict $ render (getIndexTemplate project) $ context [("index", entryListToIndex (entries project))]
-
-context :: [(Text, Text)] -> Context
-context assocs x = case lookup x $ assocs of
- Nothing -> "lol could not find that " `append` x
- Just a -> a