diff --git a/byg/src/SiteGenerator.hs b/byg/src/SiteGenerator.hs index 0fcb4d0..002ae12 100644 --- a/byg/src/SiteGenerator.hs +++ b/byg/src/SiteGenerator.hs @@ -18,7 +18,7 @@ makeImageHTML :: Token (FilePath, FilePath) -> DepGenM' Text makeImageHTML t = do (thumbnail, actual) <- untupleDepGenM t appendTexts - (inject "
convertImage files $ inject $ ResizeToWidth 800)
(zipDepGenM imagePaths thumbnailImagePaths)
- htmlBodyBase <- runPandoc $ readTextFile $ joinPaths dir $ inject "ret.md"
+ md <- readTextFile $ joinPaths dir $ inject "ret.md"
+ ingredienserHeadline <- inject "## Ingredienser"
+ mdTemplate <- makeTemplate md ingredienserHeadline
htmlBodyImages <- mapDepGenM makeImageHTML $ zipDepGenM thumbnailImageFilenames imageFilenames
imagesHtml <- concatTexts htmlBodyImages
- htmlBody <- appendTexts htmlBodyBase imagesHtml
+ md' <- applyTemplate mdTemplate (
+ appendTexts
+ (inject " Opskrift fortsætter efter billedet.