Skip to content
Snippets Groups Projects
Commit 6459b717 authored by orestis.malaspin's avatar orestis.malaspin
Browse files
parents c89587f1 a6bfdb15
No related branches found
No related tags found
No related merge requests found
image: omalaspinas/pandoc_website:latest image: omalaspinas/hakyll-bootstrap:latest
# image: omalaspinas/pandoc_website:latest
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
...@@ -31,8 +32,12 @@ before_script: ...@@ -31,8 +32,12 @@ before_script:
build_and_deploy: build_and_deploy:
script: script:
- pandoc -v
- make - make
- rsync -avzz css ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/ - rsync -avzz css ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/
- rsync -avzz figs ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/ - rsync -avzz figs ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/
- rsync -avzz index.html ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/ - rsync -avzz index.html ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/
- make build_revealjs -C hakyll-bootstrap
- make build -C hakyll-bootstrap
- make deploy -C hakyll-bootstrap
# - blc https://malaspinas.academy -ro --exclude *.pdf --filter-level 3 # - blc https://malaspinas.academy -ro --exclude *.pdf --filter-level 3
---
title: Page not found
---
<h1>Error 404</h1>
<p>
The page you were looking for does not exist. You might want to
<a href="/">go back home</a>.
</p>
...@@ -21,11 +21,12 @@ import Data.Maybe (isJust) ...@@ -21,11 +21,12 @@ import Data.Maybe (isJust)
import Hakyll.Images ( loadImage import Hakyll.Images ( loadImage
, scaleImageCompiler , scaleImageCompiler
) )
import System.Exit (ExitCode)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- | Entry point -- | Entry point
main :: IO () main :: IO ()
main = hakyllWith cfg $ do main = hakyllWith config $ do
-- Resize images -- Resize images
match "img/thumbnails/**.png" $ do match "img/thumbnails/**.png" $ do
route idRoute route idRoute
...@@ -58,6 +59,12 @@ main = hakyllWith cfg $ do ...@@ -58,6 +59,12 @@ main = hakyllWith cfg $ do
route idRoute route idRoute
compile $ copyFileCompiler compile $ copyFileCompiler
-- Render the 404 page, we don't relativize URL's here.
match "404.html" $ do
route idRoute
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/page.html" postCtx
-- Phys app posts -- Phys app posts
match "cours/isc_physics/*.markdown" $ do match "cours/isc_physics/*.markdown" $ do
route $ setExtension "html" route $ setExtension "html"
...@@ -337,25 +344,15 @@ pandocRevealCompiler = do ...@@ -337,25 +344,15 @@ pandocRevealCompiler = do
-- makeItem $ TmpFile pdfPath -- makeItem $ TmpFile pdfPath
cfg :: Configuration --------------------------------------------------------------------------------
cfg = defaultConfiguration config :: Configuration
config = defaultConfiguration
-- main :: IO () { deploySite = deploy
-- main = hakyllWith cfg $ do }
-- pages where
-- posts deploy :: Configuration -> IO ExitCode
-- cours_conc deploy _c = do
-- conc Process.rawSystem "rsync"
-- cours_mti [ "--checksum", "-avzz"
-- mti , "_site/", "ur1bg_malas@ur1bg.ftp.infomaniak.com:web/malaspinas/beta/"
-- cours_phys_app ]
-- phys_app
-- research
-- bachelor
-- index
-- templates
-- resizeThumbnails
-- resizeLarge
-- resizeHeads
-- static
watch: Main.hs cours/math_tech_info/*.md cours/isc_physics/*.md watch: build
stack exec blog -- watch
deploy: build
stack exec blog -- deploy
build: Main.hs cours/math_tech_info/*.md cours/isc_physics/*.md
make hakyll_gen -C cours/math_tech_info make hakyll_gen -C cours/math_tech_info
make hakyll_gen -C cours/isc_physics make hakyll_gen -C cours/isc_physics
make -C cours/math_tech_info make -C cours/math_tech_info
make -C cours/isc_physics make -C cours/isc_physics
make markdown -C cours/prog_seq/slides make markdown -C cours/prog_seq/slides
stack build && stack exec blog -- build && stack exec blog -- watch stack build && stack exec blog -- build
build_revealjs: build_revealjs:
cd reveal.js && npm install && npm run build && cd .. cd reveal.js && npm install && npm run build && cd ..
......
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