λ guest@typedr.at:~/posts> cat welcome.md
Log in with GitHub

Welcome!

This website is not finished, but there should not be any more changes significant enough to break database compatibility.

Hopefully, this will soon be followed by more posts about the things that I’ve been working on lately.

Comments

typedrat

postView :: Slug -> RatActionCtx ctx st ()
postView s = do
    tv <- usernameVar
    (post, comments) <- postWithComments s
    let tv' = tv
            ::: (K :: Key "path") =: "~/posts"
            ::: (K :: Key "command") =: T.concat ["cat ", unSlug s, ".md"]
            ::: (K :: Key "post") =: post
            ::: (K :: Key "comments") =: comments

    ratT tv' $ layout "" postTemplate

typedrat

This is definitely a programmer’s website.

Add Comment

Log in with GitHub