Restrict imports in Lucid + use '<.>' to delimit filename and extension
This commit is contained in:
parent
5163d13ce8
commit
77fc715294
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ import Control.Monad.Reader (ReaderT, asks)
|
||||||
import qualified Data.Map as Map (elems)
|
import qualified Data.Map as Map (elems)
|
||||||
import qualified Data.Text.Lazy.IO as TextIO (writeFile)
|
import qualified Data.Text.Lazy.IO as TextIO (writeFile)
|
||||||
import DOM (page)
|
import DOM (page)
|
||||||
import Lucid
|
import Lucid (renderTextT)
|
||||||
import Pretty ((.$))
|
import Pretty ((.$))
|
||||||
import System.FilePath.Posix ((</>), (<.>))
|
import System.FilePath.Posix ((</>), (<.>))
|
||||||
|
|
||||||
|
@ -22,12 +22,12 @@ articlesLists :: Monad m => Collection -> ReaderT Blog m [(FilePath, ArticlesLis
|
||||||
articlesLists (Collection {articlesFeatured, basePath, tag}) = do
|
articlesLists (Collection {articlesFeatured, basePath, tag}) = do
|
||||||
limit <- take <$> (asks $skin.$previewArticlesCount)
|
limit <- take <$> (asks $skin.$previewArticlesCount)
|
||||||
return [
|
return [
|
||||||
(basePath </> "index.html", ArticlesList {
|
(basePath </> "index" <.> "html", ArticlesList {
|
||||||
tagged = tag
|
tagged = tag
|
||||||
, full = False
|
, full = False
|
||||||
, featured = limit articlesFeatured
|
, featured = limit articlesFeatured
|
||||||
})
|
})
|
||||||
, (basePath </> "all.html", ArticlesList {
|
, (basePath </> "all" <.> "html", ArticlesList {
|
||||||
tagged = tag
|
tagged = tag
|
||||||
, full = True
|
, full = True
|
||||||
, featured = articlesFeatured
|
, featured = articlesFeatured
|
||||||
|
|
Loading…
Reference in a new issue