add download field for svgs etc

This commit is contained in:
Rhiannon Morris 2020-07-22 01:48:29 +02:00
parent 6f3941e816
commit e09e56d5df
3 changed files with 18 additions and 12 deletions

View file

@ -7,7 +7,7 @@ where
import BuilderQQ
import Info hiding (Text)
import Data.Maybe (fromMaybe)
import Data.Maybe (fromMaybe, mapMaybe)
import Data.Text.Lazy (Text)
import System.FilePath
@ -26,8 +26,9 @@ dependSingle' yamlDir info prefix build nsfw =
let dir = build </> prefix </> yamlDir
images = if nsfw then #images info else #sfwImages info
paths = map #path images
dls = mapMaybe #download images
index = dir </> "index.html"
deps = thumbFile (thumbnail info) : map pageFile paths ++ paths
deps = thumbFile (thumbnail info) : map pageFile paths ++ paths ++ dls
deps' = unwords $ map (dir </>) deps
in
[b|$@index: $@deps' $$(MAKEPAGES)|]