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..e10ac74a2f09c5eeabadda6a87712ec740ee56c0 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 @@ -259,6 +278,24 @@ bibtexCompiler = do >>= readPandocWith defaultHakyllReaderOptions >>= return . writePandocWith pandocOptions +revealCompiler :: Compiler (Item String) +revealCompiler = do + getResourceBody + >>= withItemBody (unixFilter "pandoc" ["-F" + , "pandoc-numbering" + , "-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 +306,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 0389b759339f2b7b18b5ee65ffcf9cb0cda0a172..5b33fc8b0509f8d90a8429512cd5ed4aec89292d 100644 --- a/hakyll-bootstrap/hakyll-bootstrap.cabal +++ b/hakyll-bootstrap/hakyll-bootstrap.cabal @@ -14,9 +14,9 @@ executable blog build-depends: base , containers - , pandoc + , pandoc , pandoc-crossref - , hakyll + , hakyll , hakyll-images , process , text diff --git a/hakyll-bootstrap/stack.yaml b/hakyll-bootstrap/stack.yaml index 2a9b203bf216564f57f1f4c0e5da2df0672bb5d4..32d237cc2d0f1f4caf2e968e1d7d805786db2d56 100644 --- a/hakyll-bootstrap/stack.yaml +++ b/hakyll-bootstrap/stack.yaml @@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: nightly-2020-04-18 +resolver: lts-16.20 # User packages to be built. # Various formats can be used as shown in the example below. @@ -40,13 +40,22 @@ packages: # commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a # extra-deps: - - pandoc-crossref-0.3.6.2 + - hakyll-4.13.4.1 + - pandoc-crossref-0.3.8.0 - data-accessor-template-0.2.1.16 - roman-numerals-0.5.1.5 - hakyll-images-0.4.4 - process-1.6.8.0 - text-1.2.4.0 - filepath-1.4.2.1 + - 'commonmark-0.1.0.2' + - 'commonmark-extensions-0.2.0.1' + - 'commonmark-pandoc-0.2.0.1' + - 'hslua-1.1.2' + - 'jira-wiki-markup-1.3.2' + - 'pandoc-2.10.1' + - 'pandoc-types-1.21' + - Cabal-3.2.1.0 # Override default flag values for local packages and extra-deps # flags: {} @@ -70,4 +79,4 @@ extra-deps: # # Allow a newer minor version of GHC than the snapshot specifies # compiler-check: newer-minor -allow-newer: true +# allow-newer: true