From e6c4da79aece323c031b814c6ae203d23874c092 Mon Sep 17 00:00:00 2001 From: Orestis <orestis.malaspinas@hesge.ch> Date: Tue, 17 Nov 2020 00:38:42 +0100 Subject: [PATCH] updated team with posts like syntax --- hakyll-bootstrap/Main.hs | 26 +++++++++++++++++++++----- hakyll-bootstrap/templates/nav.html | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/hakyll-bootstrap/Main.hs b/hakyll-bootstrap/Main.hs index 57774ac..cd60e10 100644 --- a/hakyll-bootstrap/Main.hs +++ b/hakyll-bootstrap/Main.hs @@ -123,6 +123,20 @@ main = hakyllWith config $ do >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Programmation séquentielle" "cours/isc_physics/cours.pdf") >>= relativizeUrls + -- Team description + match "team/*.md" $ do + route $ setExtension "html" + compile $ pandocRevealCompiler + >>= relativizeUrls + + -- Phys app post list + create ["team.html"] $ do + route idRoute + compile $ do + posts <- recentFirst =<< loadAll "team/*.md" + makeItem "" + >>= loadAndApplyTemplate "templates/team.html" (courseRevealCtx posts "Team") + >>= relativizeUrls -- Index match "index.html" $ do @@ -133,11 +147,13 @@ main = hakyllWith config $ do >>= applyAsTemplate (indexCtx posts) >>= relativizeUrls - match "pages/*" $ do - route $ setExtension "html" - compile $ getResourceBody - >>= loadAndApplyTemplate "templates/page.html" postCtx - >>= relativizeUrls + -- match "pages/*" $ do + -- route $ setExtension "html" + -- compile $ getResourceBody + -- >>= loadAndApplyTemplate "templates/page.html" postCtx + -- >>= relativizeUrls + + -- Read templates match "templates/*" $ compile templateCompiler diff --git a/hakyll-bootstrap/templates/nav.html b/hakyll-bootstrap/templates/nav.html index 654ef32..7e8137c 100644 --- a/hakyll-bootstrap/templates/nav.html +++ b/hakyll-bootstrap/templates/nav.html @@ -28,7 +28,7 @@ </ul> <li><a href="/research_projects.html">Research projects</a></li> <li><a href="/bachelor_projects.html">Bachelor projects</a></li> - <li><a href="/pages/team.html">Team</a></li> + <li><a href="/team.html">Team</a></li> <li><a href="/pages/contact.html">Contact </a></li> </li> </ul> -- GitLab