Fixed template hack

Templates are directly compiled from the `hs` file. They are thus
identified with the source name, e.g. `src/Kit/Templates/Post.hs`.
This commit is contained in:
Etienne Werly 2022-09-26 11:30:24 +02:00
parent 84eef2f8cd
commit 2d19db1362
2 changed files with 13 additions and 8 deletions

View file

@ -8,11 +8,16 @@ and this project adheres to the
## Unreleased
### Backend
* Add Atom and RSS feeds
* Add sitemap.xml
### Planned utils
* Add svg generation (with diagrams-lib, or diagrams? Investigation needed)
* Add font subsetting
* Add images utils such as conversion to png, avif and other formats (see hip)
* Add font subsetting (or svg icons support / fonts)
* Add images utils such as conversion to png, avif and other formats (see hip and JuicyPixels)
## 0.1.0.0 - YYYY-MM-DD

View file

@ -17,14 +17,14 @@ main = hakyll $ do
route $ moveFromToWithExtension "src/Css/" "css/" "css"
compile runGHC
match "src/Kit/Templates/*.hs" $ do
route $ moveFromToWithExtension "src/Kit/Templates" "../_templates" "html"
compile runGHC
match "src/Kit/Templates/*.hs"
$ compile
$ runGHC
>>= compileTemplateItem
>>= makeItem
match "posts/*.md" $ do
route $ setExtension "html"
compile
$ pandocCompiler
>>= loadAndApplyTemplate "_templates/post.html" defaultContext
match "_templates/*" $ compile templateBodyCompiler
>>= loadAndApplyTemplate "src/Kit/Templates/Post.hs" defaultContext