i am a monad god

This commit is contained in:
Shaun Kerr 2018-09-04 10:58:04 +12:00
parent 90676ce488
commit b050980644
4 changed files with 8 additions and 3 deletions

View File

@ -10,6 +10,8 @@ you access archives and find:
and make me very sad.
> full disclosure, the only reason this page still exists is because of the netrunner joke. im pretty sure the front page shows every post anyway.
> ~full disclosure, the only reason this page still exists is because of the netrunner joke. im pretty sure the front page shows every post anyway.~
> turns out im not quite as stupid as i thought and worked out how monads work so i could limit front page to a few posts. this page is back in business baby!
you also find all of this junk:

View File

@ -8,7 +8,7 @@ mkDerivation {
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base binary filepath hakyll hakyll-favicon ];
librarySystemDepends = [ imagemagick ];
#executableSystemDepends = [ imagemagick ];
homepage = "regularflolloping.com";
description = "tA's blog";
license = stdenv.lib.licenses.bsd3;

View File

@ -5,6 +5,7 @@ title: Home
<p>please don't laugh at me i really like swatch internet time</p>
<p>here are some recent (for a very liberal definition of the word) posts:</p>
<p> - now only shows a few posts because im not dumb anymore - </p>
<h2>"Recent" Posts</h2>
$partial("templates/post-list.html")$

View File

@ -82,7 +82,9 @@ main = do
match "index.html" $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
posts <- (return . (take 5))
=<< recentFirst
=<< loadAll "posts/*"
let indexCtx =
listField "posts" postCtx (return posts) <> ctx
getResourceBody