Skip to content
Snippets Groups Projects
Verified Commit 6f2727af authored by orestis.malaspin's avatar orestis.malaspin
Browse files

hopefully this works now

parent dfac0e11
No related branches found
No related tags found
No related merge requests found
Pipeline #15665 failed
......@@ -56,6 +56,7 @@ main = hakyllWith config $ do
.||. "cours/prog_seq/slides/figs/*"
-- .||. "cours/algo/slides/figs/*"
.||. "cours/math_tech_info/figs/*"
-- .||. "cours/algo/slides/*.json"
.||. "cours/algo/slides/*.pdf"
.||. "cours/math_tech_info/cours.pdf"
.||. "cours/isc_physics/cours.pdf"
......@@ -128,20 +129,26 @@ main = hakyllWith config $ do
>>= relativizeUrls
-- -- Algorithmique slides
-- Algorithmique slides
-- match "cours/algo/slides/*.markdown" $ do
-- route $ setExtension "html"
-- compile $ pandocRevealCompiler
-- >>= loadAndApplyTemplate "templates/reveal.html" postCtx
-- >>= relativizeUrls
match "cours/algo/slides/index.md" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= relativizeUrls
-- Prog seq post list
create ["cours/algo.html"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "cours/algo/slides/index.md"
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" (pagesCtx posts "Algorithmique et structure de données")
>>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Les slides d'Algorithmique en PDF" "algo/slides/index.html")
>>= relativizeUrls
-- Team description
......@@ -219,6 +226,7 @@ main = hakyllWith config $ do
where
staticPages =
[ "pages/contact.md"
-- , "cours/algo/slides/index.md"
]
-- Used to compile to PDF
......@@ -247,6 +255,11 @@ mathCtx = field "mathjax" $ \item -> do
then "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML\"></script>"
else ""
noPostCtx title pdfurl =
constField "title" title
`mappend` constField "pdfurl" pdfurl
`mappend` defaultContext
courseCtx posts title pdfurl =
listField "posts" postCtx (return posts)
`mappend` constField "title" title
......@@ -358,17 +371,17 @@ config :: Configuration
config = defaultConfiguration
{
deploySite = deploy
-- , ignoreFile = ignoreFile'
-- , ignoreFile = ignoreFile'
}
where
-- ignoreFile' path
-- | "." `isPrefixOf` fileName = False
-- | "#" `isPrefixOf` fileName = True
-- | "~" `isSuffixOf` fileName = True
-- | ".swp" `isSuffixOf` fileName = True
-- | otherwise = False
-- where
-- fileName = takeFileName path
-- ignoreFile' path
-- | "." `isPrefixOf` fileName = False
-- | "#" `isPrefixOf` fileName = True
-- | "~" `isSuffixOf` fileName = True
-- | ".swp" `isSuffixOf` fileName = True
-- | otherwise = False
-- where
-- fileName = takeFileName path
deploy :: Configuration -> IO ExitCode
deploy _c = do
Process.rawSystem "rsync"
......
......@@ -11,6 +11,8 @@ build: update Main.hs cours/math_tech_info/*.md cours/isc_physics/*.md
make -C cours/isc_physics
make markdown -C cours/prog_seq/slides
# make markdown -C cours/algo/slides
make puppeteer -C cours/algo/slides
make -C cours/algo/slides
make index -C cours/algo/slides
stack build --allow-different-user && stack exec --allow-different-user blog -- build
# cabal install && blog build
......
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>$title$</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/syntax.css" rel="stylesheet">
<link href="/css/carousel.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style>
body {
font-family: 'Open Sans', sans-serif;
}
body { margin-top: 80px; }
footer { margin-top: 80px; }
</style>
</head>
<body>
$partial("templates/nav.html")$
<div class="container">
<h1>$title$</h1>
$if(pdfurl)$
<h3><a href="$pdfurl$">Le polycopié en entier [pdf]</a></h3>
$endif$
<h2>Les chapitres</h2>
$partial("templates/footer.html")$
</div>
</div><!-- /.container -->
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/holder.js"></script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment