wrote out the scaffolding for work to do a live server later

This commit is contained in:
Pagwin 2025-12-05 13:26:09 -05:00
parent d9e46a1a83
commit 6c81f761d6
No known key found for this signature in database
GPG key ID: 81137023740CA260
2 changed files with 6 additions and 1 deletions

View file

@ -6,4 +6,5 @@
- [ ] dev server setup (with live reloading)
- https://hackage-content.haskell.org/package/warp-3.4.10
- https://hackage.haskell.org/package/file-embed
- https://hackage.haskell.org/package/fsnotify
- [ ] see if performance can be improved (it isn't slow atm but it definitely feels like there's a bottleneck)

View file

@ -28,9 +28,10 @@ import Utilities.FilePath (indexHtmlOutputPath, indexHtmlSourcePaths, isMarkdown
-- Rule = pattern of thing being made + actions to produce the thing
-- Action = actions to produce a thing
-- note: live watch should be done outside of shake with the watcher then running shake which is rather annoying
main :: IO ()
main = do
Shake.shakeArgs Shake.shakeOptions {Shake.shakeProgress = Shake.progressSimple} $ do
Shake.shakeArgs Shake.shakeOptions {Shake.shakeProgress = psbProgress} $ do
Shake.withTargetDocs "Build the site" $
"build" ~> buildSite
Shake.withTargetDocs "Clean the built site" $
@ -168,3 +169,6 @@ postHandles = [(isMarkdownPost, markdownToPost)]
isDraft :: FilePath -> Action Bool
isDraft = isDraft' postHandles
psbProgress :: IO Shake.Progress -> IO ()
psbProgress = Shake.progressDisplay 0.01 putStrLn