diff --git a/.gitmodules b/.gitmodules index 4ae0889b81bce4eac098951b00c402f0f430b384..59efd2b75418b2fad609d9f488343d27107e044f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "hakyll-bootstrap/cours/isc_physics"] path = hakyll-bootstrap/cours/isc_physics url = https://gitedu.hesge.ch/orestis.malaspin/isc_physics.git +[submodule "hakyll-bootstrap/cours/prog_seq"] + path = hakyll-bootstrap/cours/prog_seq + url = https://gitedu.hesge.ch/programmation_sequentielle/cours.git diff --git a/hakyll-bootstrap/Main.hs b/hakyll-bootstrap/Main.hs index 6c056540fbb37f4ddaafa32283282f3ee1e588af..f8ec77eb68e9b18942548ba0279b088c066cb591 100644 --- a/hakyll-bootstrap/Main.hs +++ b/hakyll-bootstrap/Main.hs @@ -134,6 +134,25 @@ bachelor = do >>= loadAndApplyTemplate "templates/archive.html" (bachelorCtx posts) >>= relativizeUrls +cours_prog_seq :: Rules () +cours_prog_seq = do + match "cours/prog_seq/*.md" $ do + route $ setExtension "html" + -- compile $ myPandocCompiler + compile $ revealCompiler + >>= loadAndApplyTemplate "templates/class.html" postCtx + >>= relativizeUrls + +prog_seq :: Rules () +prog_seq = do + create ["prog_seq.html"] $ do + route idRoute + compile $ do + posts <- recentFirst =<< loadAll "cours/prod_seq/*" + makeItem "" + >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Programmation séquentielle") + >>= relativizeUrls + cours_conc :: Rules () cours_conc = do match "cours/*" $ do @@ -250,8 +269,6 @@ bibtexCompiler :: Compiler (Item String) bibtexCompiler = do getResourceBody >>= withItemBody (unixFilter "pandoc" ["-F" - , "pandoc-numbering" - , "-F" , "pandoc-crossref" , "-t" , "markdown" @@ -259,6 +276,22 @@ bibtexCompiler = do >>= readPandocWith defaultHakyllReaderOptions >>= return . writePandocWith pandocOptions +revealCompiler :: Compiler (Item String) +revealCompiler = do + getResourceBody + >>= withItemBody (unixFilter "pandoc" ["-F" + , "pandoc-crossref" + , "-t" + , "revealjs" + , "--self-contained" + , "--metadata" + , "title=metadata.yaml" + , "-V" + , "theme=white" + ]) + >>= readPandocWith defaultHakyllReaderOptions + >>= return . writePandocWith pandocOptions + cfg :: Configuration cfg = defaultConfiguration @@ -269,6 +302,8 @@ main = hakyllWith cfg $ do posts cours_conc conc + cours_prog_seq + prog_seq cours_mti mti cours_phys_app diff --git a/hakyll-bootstrap/cours/prog_seq b/hakyll-bootstrap/cours/prog_seq new file mode 160000 index 0000000000000000000000000000000000000000..f8f4b6ca9aef830cab7b0d1e87273ea823460e75 --- /dev/null +++ b/hakyll-bootstrap/cours/prog_seq @@ -0,0 +1 @@ +Subproject commit f8f4b6ca9aef830cab7b0d1e87273ea823460e75 diff --git a/hakyll-bootstrap/hakyll-bootstrap.cabal b/hakyll-bootstrap/hakyll-bootstrap.cabal index f479539c5aa84b1f555da520129c28c50d460c20..5718c3976ea2dd6038833bb527c16904f4fd95c6 100644 --- a/hakyll-bootstrap/hakyll-bootstrap.cabal +++ b/hakyll-bootstrap/hakyll-bootstrap.cabal @@ -14,7 +14,7 @@ executable blog build-depends: base , containers - , pandoc + , pandoc , pandoc-crossref , hakyll == 4.13.4.1 , hakyll-images diff --git a/hakyll-bootstrap/stack.yaml b/hakyll-bootstrap/stack.yaml index 6a7aa698a74780daa790547ab65d94e122d23f63..f57dc20dc9b62eaec5f0985291fcf49b2db2420d 100644 --- a/hakyll-bootstrap/stack.yaml +++ b/hakyll-bootstrap/stack.yaml @@ -55,6 +55,7 @@ extra-deps: - pandoc-citeproc-0.17.0.2@sha256:39c5c60a5eca2c1cb50ae9a00dc7093ca1baac78ad5be4e222505de257dce456,8737 - skylighting-0.8.5@sha256:a6e316e7440f0395d64f3a412cd6985783ec68a171e117d5e1bab1204c565a71,9726 - skylighting-core-0.8.5@sha256:f35397ea99d7d0fd4f45899102c040408d2bab802ea9d08ad1a970be58b43b49,8056 + # Override default flag values for local packages and extra-deps # flags: {}