From 77fc7152948898c517c627d2fe1060f317cbaef7 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Mon, 23 Mar 2020 09:40:41 +0100 Subject: [PATCH] Restrict imports in Lucid + use '<.>' to delimit filename and extension --- src/HTML.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HTML.hs b/src/HTML.hs index 25efb21..c2d5fed 100644 --- a/src/HTML.hs +++ b/src/HTML.hs @@ -14,7 +14,7 @@ import Control.Monad.Reader (ReaderT, asks) import qualified Data.Map as Map (elems) import qualified Data.Text.Lazy.IO as TextIO (writeFile) import DOM (page) -import Lucid +import Lucid (renderTextT) import Pretty ((.$)) import System.FilePath.Posix ((), (<.>)) @@ -22,12 +22,12 @@ articlesLists :: Monad m => Collection -> ReaderT Blog m [(FilePath, ArticlesLis articlesLists (Collection {articlesFeatured, basePath, tag}) = do limit <- take <$> (asks $skin.$previewArticlesCount) return [ - (basePath "index.html", ArticlesList { + (basePath "index" <.> "html", ArticlesList { tagged = tag , full = False , featured = limit articlesFeatured }) - , (basePath "all.html", ArticlesList { + , (basePath "all" <.> "html", ArticlesList { tagged = tag , full = True , featured = articlesFeatured