diff --git a/hakyll-bootstrap/Main.hs b/hakyll-bootstrap/Main.hs index 1ef1ca75a1b0547e07b9d5f03b8676b412cd7742..6c056540fbb37f4ddaafa32283282f3ee1e588af 100644 --- a/hakyll-bootstrap/Main.hs +++ b/hakyll-bootstrap/Main.hs @@ -71,7 +71,8 @@ static = do .||. "img/*/**.png" .||. "css/*" .||. "js/*" - .||. "cours/math_tech_info/figs/*") $ do + .||. "cours/math_tech_info/figs/*" + .||. "cours/isc_physics/figs/*") $ do route idRoute compile $ copyFileCompiler @@ -82,6 +83,13 @@ resizeThumbnails = do compile $ loadImage >>= scaleImageCompiler 140 140 +resizeHeads :: Rules () +resizeHeads = do + match "img/heads/**.png" $ do + route idRoute + compile $ loadImage + >>= scaleImageCompiler 256 256 + resizeLarge :: Rules () resizeLarge = do match "img/large/**.png" $ do @@ -164,6 +172,25 @@ mti = do >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Mathématiques en technologie de l'information") >>= relativizeUrls +cours_phys_app :: Rules () +cours_phys_app = do + match "cours/isc_physics/*.markdown" $ do + route $ setExtension "html" + -- compile $ myPandocCompiler + compile $ bibtexCompiler + >>= loadAndApplyTemplate "templates/class.html" postCtx + >>= relativizeUrls + +phys_app :: Rules () +phys_app = do + create ["phys_app.html"] $ do + route idRoute + compile $ do + posts <- recentFirst =<< loadAll "cours/isc_physics/*" + makeItem "" + >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Physique appliquée") + >>= relativizeUrls + index :: Rules () index = do match "index.html" $ do @@ -244,11 +271,14 @@ main = hakyllWith cfg $ do conc cours_mti mti + cours_phys_app + phys_app research bachelor index templates resizeThumbnails resizeLarge + resizeHeads static diff --git a/hakyll-bootstrap/Makefile b/hakyll-bootstrap/Makefile index 5ee9ad5707ee194c61bf8893cfc4f7b86aec9af6..34ed7992599a9874c301deb518f8a0224951fb49 100644 --- a/hakyll-bootstrap/Makefile +++ b/hakyll-bootstrap/Makefile @@ -1,7 +1,9 @@ -watch: +watch: Main.hs cours/math_tech_info/*.md cours/isc_physics/*.md make hakyll_gen -C cours/math_tech_info - stack build && stack exec blog -- watch + make hakyll_gen -C cours/isc_physics + stack build && stack exec blog -- rebuild && stack exec blog -- watch clean: rm -rf _cache _site - make clean -C cours/math_tech_info \ No newline at end of file + make clean -C cours/math_tech_info + make clean -C cours/isc_physics diff --git a/hakyll-bootstrap/cours/isc_physics b/hakyll-bootstrap/cours/isc_physics index 84eaf9574581175da1da2ce2564caede9be3a818..f7cce04fd3823928781f30e8c5d497acfafde470 160000 --- a/hakyll-bootstrap/cours/isc_physics +++ b/hakyll-bootstrap/cours/isc_physics @@ -1 +1 @@ -Subproject commit 84eaf9574581175da1da2ce2564caede9be3a818 +Subproject commit f7cce04fd3823928781f30e8c5d497acfafde470