Run metacompilers instead of ignoring them
This commit is contained in:
parent
1bf95c0028
commit
7bf3450caf
1 changed files with 17 additions and 11 deletions
|
@ -141,17 +141,23 @@ runCompilers ((id', compiler) : compilers) = Hakyll $ do
|
||||||
result <- liftIO $ runCompiler compiler id' provider url store isModified
|
result <- liftIO $ runCompiler compiler id' provider url store isModified
|
||||||
liftIO $ putStrLn $ "Generated target: " ++ show id'
|
liftIO $ putStrLn $ "Generated target: " ++ show id'
|
||||||
|
|
||||||
let CompileRule compiled = result
|
case result of
|
||||||
|
-- Compile rule for one item, easy stuff
|
||||||
|
CompileRule compiled -> do
|
||||||
|
case url of
|
||||||
|
Nothing -> return ()
|
||||||
|
Just r -> liftIO $ do
|
||||||
|
putStrLn $ "Routing " ++ show id' ++ " to " ++ r
|
||||||
|
let path = "_site" </> r
|
||||||
|
makeDirectories path
|
||||||
|
write path compiled
|
||||||
|
|
||||||
case url of
|
liftIO $ putStrLn ""
|
||||||
Nothing -> return ()
|
|
||||||
Just r -> liftIO $ do
|
|
||||||
putStrLn $ "Routing " ++ show id' ++ " to " ++ r
|
|
||||||
let path = "_site" </> r
|
|
||||||
makeDirectories path
|
|
||||||
write path compiled
|
|
||||||
|
|
||||||
liftIO $ putStrLn ""
|
-- Continue for the remaining compilers
|
||||||
|
unHakyll $ runCompilers compilers
|
||||||
|
|
||||||
-- Continue for the remaining compilers
|
-- Metacompiler, slightly more complicated
|
||||||
unHakyll $ runCompilers compilers
|
MetaCompileRule newCompilers -> do
|
||||||
|
-- Actually I was just kidding, it's not hard at all
|
||||||
|
unHakyll $ addNewCompilers compilers newCompilers
|
||||||
|
|
Loading…
Reference in a new issue