Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
homepage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orestis.malaspin
homepage
Commits
6f2727af
Verified
Commit
6f2727af
authored
3 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
hopefully this works now
parent
dfac0e11
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#15665
failed
3 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hakyll-bootstrap/Main.hs
+24
-11
24 additions, 11 deletions
hakyll-bootstrap/Main.hs
hakyll-bootstrap/Makefile
+2
-0
2 additions, 0 deletions
hakyll-bootstrap/Makefile
hakyll-bootstrap/templates/static_course.html
+38
-0
38 additions, 0 deletions
hakyll-bootstrap/templates/static_course.html
with
64 additions
and
11 deletions
hakyll-bootstrap/Main.hs
+
24
−
11
View file @
6f2727af
...
...
@@ -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"
(
pages
Ctx
posts
"Algorithmique e
t structure de données
"
)
>>=
loadAndApplyTemplate
"templates/archive.html"
(
course
Ctx
posts
"
Les slides d'
Algorithmique e
n 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"
...
...
This diff is collapsed.
Click to expand it.
hakyll-bootstrap/Makefile
+
2
−
0
View file @
6f2727af
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
hakyll-bootstrap/templates/static_course.html
0 → 100644
+
38
−
0
View file @
6f2727af
<!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>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment