Don't hardcode images path in blog post
parent
456b6b1df3
commit
cae4d68870
|
@ -97,8 +97,11 @@ blogPost
|
|||
-> Text
|
||||
-> Text
|
||||
-> Day
|
||||
-> FilePath
|
||||
-> Text
|
||||
blogPost title see adj1 adj2 seal date =
|
||||
blogPost title see adj1 adj2 seal date imagesPath =
|
||||
let imagesPath' = T.pack imagesPath
|
||||
in
|
||||
[text|
|
||||
---
|
||||
title: $title
|
||||
|
@ -106,7 +109,7 @@ blogPost title see adj1 adj2 seal date =
|
|||
|
||||
$see this $adj1, $adj2 seal!
|
||||
<img
|
||||
src="/images/$seal"
|
||||
src="$imagesPath'/$seal"
|
||||
alt="A picture of a $adj1, $adj2 seal! <3"
|
||||
width="400"
|
||||
/>
|
||||
|
@ -138,6 +141,7 @@ sealText config n date = ( fileName', bp)
|
|||
"older"
|
||||
"birthdaySeal.jpg"
|
||||
date
|
||||
(sealImagesPath config)
|
||||
|
||||
blogPost' (_, 04, 01) =
|
||||
blogPost
|
||||
|
@ -147,6 +151,7 @@ sealText config n date = ( fileName', bp)
|
|||
"supermodel, singing"
|
||||
"singerSeal.jpg"
|
||||
date
|
||||
(sealImagesPath config)
|
||||
|
||||
blogPost' (_, _, _) =
|
||||
blogPost
|
||||
|
@ -156,6 +161,7 @@ sealText config n date = ( fileName', bp)
|
|||
(randomPull $ adjectives2 config)
|
||||
(randomPull $ unsafeListDirContents $ sealImagesPath config)
|
||||
date
|
||||
(sealImagesPath config)
|
||||
|
||||
|
||||
{-
|
||||
|
|
Loading…
Reference in New Issue