From 47d086c11529857b387916668ed49faad778dc2b Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Sat, 5 Oct 2024 15:58:55 +0200 Subject: [PATCH] Also copy image files over --- byg/src/SiteGenerator.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/byg/src/SiteGenerator.hs b/byg/src/SiteGenerator.hs index 809be95..21953b4 100644 --- a/byg/src/SiteGenerator.hs +++ b/byg/src/SiteGenerator.hs @@ -3,6 +3,7 @@ module SiteGenerator (generateSite) where import Types import DependencyGenerator +import Control.Monad (forM_) import Data.Text (Text) thumbnailImageFilename :: Token FilePath -> DepGenM' FilePath @@ -67,3 +68,9 @@ generateSite = do saveFile html $ joinPaths aboutDir indexName styleName <- inject "style.css" copyFile styleName (joinPaths outputDir styleName) + imgName <- inject "img" + imgPathOut <- joinPaths outputDir imgName + makeDir imgPathOut + forM_ ["mad-icon.png", "mad-logo.png"] $ \name -> do + val <- inject name + copyFile (joinPaths imgName val) (joinPaths imgPathOut val)