🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit 1e6f1f2da531d2e44bbb9f49b3d0484d705066ee
Parent: 97fcd7e0a9a976e65e9f7fde460fd73fc334f6a3
Author: mcol <mcol@posteo.net>
Date: 2022-05-29 16:42:51 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2022-05-29 16:42:51 +0100

add runInIO to gen

src/Repositories.hs Modified

@@ -139,17 +139,17 @@
                     -- Run the generator --
                     let quiet = envQuiet env
                         force = envForce env
-                        gen = genTarget scope quiet force
+                        gen = genTarget scope runInIO quiet force
 
                     mapM_ (genRepo scope runInIO output) (envRepoTemplates env)
 
                     whenJust (envCommitTemplate env) \commitT -> do
                         output' <- fmap (output </>) . parseRelDir $ "commit"
-                        mapM_ (gen runInIO commitT "commit" output' commitHref) commits
+                        mapM_ (gen commitT "commit" output' commitHref) commits
 
                     whenJust (envFileTemplate env) \fileT -> do
                         output' <- fmap (output </>) . parseRelDir $ "file"
-                        mapM_ (gen runInIO fileT "file" output' fileHref) tree -- TODO: detect file changes
+                        mapM_ (gen fileT "file" output' fileHref) tree -- TODO: detect file changes
 
                     -- Copy any static files/folders into the output folder --
                     envRepoCopyStatics env output
@@ -378,16 +378,16 @@
 genTarget ::
     ToGVal RunRepo t =>
     HashMap.HashMap T.Text (GVal RunRepo) ->
+    (ReaderT LgRepo IO (GVal RunRepo) -> IO (GVal RunRepo)) ->
     Bool ->
     Bool ->
-    (ReaderT LgRepo IO (GVal RunRepo) -> IO (GVal RunRepo)) ->
     Template ->
     T.Text ->
     Path Abs Dir ->
     (t -> FilePath) ->
     t ->
     IO ()
-genTarget scope quiet force runInIO template category output href target = do
+genTarget scope runInIO quiet force template category output href target = do
     output' <- fmap (output </>) . parseRelFile . href $ target
     exists <- doesFileExist output'
     when (force || not exists) $ do