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I7CXLWVPB3NKU5KUAHQXQIX3XNQC
-- Hakyll does not manage org metadata. We follow @nasyxx hack mentioned here
-- https://github.com/jaspervdj/hakyll/issues/700
-- with a slight modification in cleanRouteFromTemp
-- The idea is to generate in _temp the file with YAML metada on top on org metadat
-- Then a second pass is needed to generate actual HTML
-- Notes are in org-roam so managed outside hakelly because
-- 1. Hakyll does not manage org metadata.
-- 2. we have a custom filter to correct org-roam internal link
match ("notes/index.org" .||. "notes/*japonais*.org") $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
match ("notes/*microbio*.org" .||. "notes/medecine/202*.org") $ do
route $ setExtension "html"
compile $ pandocCompiler
-- >>= loadAndApplyTemplate "templates/post.html" defaultContext
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
-- Don't forget to set the path to temporary files
create ["notes/medecine.html"] $ do
route idRoute
compile $ do
notes <- loadAll "notes/medecine/*"
let notesCtx =
listField "notes" defaultContext (return notes) `mappend`
constField "title" "Notes" `mappend`
defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/notes.html" notesCtx
>>= loadAndApplyTemplate "templates/default.html" notesCtx
>>= relativizeUrls
- [[./20230531000449-infections_urinaires.html][Infections urinaires]]
- [[./20230531000409-gastro_enterites.html][Gastro-entérites]]
- [[id:9347af68-14c8-4bc0-b986-9dc4da51c13d][Infections urinaires]]
- [[id:a36141db-9bb2-48ff-8c48-f96bbc4aebf6][Gastro-entérites]]
org <- getDirectoryFiles "" ["notes/medecine/*.org"]
let html = ["_build" </> n -<.> "html" | n <- org]
need html
cmd "pandoc" src "--filter ./filterOrgRoam -o" [out]
-- Only org roam notes (starting with the date)
org <- getDirectoryFiles "" ["notes/medecine/20*.org"]
let html = ["_site" </> n -<.> "html" | n <- org]
need $ html ++ [filterExe]
cmd "pandoc" src "--filter " filterExe "-s --css /css/default.css -o" [out]
-- phony "hut" $ do
-- putInfo "Upload to blog hosted by sourcehut"
-- need ["archive"]
-- cmd_ "hut pages publish _build/site.tar.gz -d scut.srht.site"
phony "hut" $ do
putInfo "Upload to blog hosted by sourcehut"
need ["archive"]
cmd_ "hut pages publish _build/site.tar.gz -d scut.srht.site"