experiment with rebuilding my website in hakyll
  • Haskell 68.2%
  • Nix 17.2%
  • Typst 9.7%
  • JavaScript 3.7%
  • Just 1.2%
Find a file
2026-01-02 04:23:26 -08:00
.github/workflows ci: run the right check 2026-01-02 04:23:00 -08:00
css chore: run nix fmt and clean house 2026-01-02 04:17:40 -08:00
cv feat: port more pages and refine typst infrastructure 2025-12-29 17:32:34 -08:00
fonts feat: port the styles and infrastructure of og website 2025-12-29 02:37:44 -08:00
nix feat: add treefmt 2026-01-02 04:16:41 -08:00
posts chore: more housekeeping 2026-01-02 03:59:18 -08:00
root fix: eof 2026-01-02 04:21:42 -08:00
src feat: truncate commit hash when displaying 2026-01-02 04:06:42 -08:00
static feat: assorted housekeeping 2026-01-01 23:10:10 -08:00
typst/pkgs/html-shim/0.1.0 feat: mathematical figures dark mode and center 2026-01-02 03:42:34 -08:00
.envrc initial commit 2025-12-29 01:13:34 -08:00
.gitattributes chore: update gitattributes 2026-01-01 22:25:17 -08:00
.gitignore feat: incorporate fonts into build process 2026-01-02 04:00:53 -08:00
.hlint.yaml feat: acquire context in blaze templates 2025-12-30 18:18:15 -08:00
.prettierrc feat: add treefmt 2026-01-02 04:16:41 -08:00
cabal.project initial commit 2025-12-29 01:13:34 -08:00
flake.lock feat: add treefmt 2026-01-02 04:16:41 -08:00
flake.nix feat: add treefmt 2026-01-02 04:16:41 -08:00
fourmolu.yaml initial commit 2025-12-29 01:13:34 -08:00
justfile chore: update justfile 2026-01-02 04:03:21 -08:00
LICENSE license: update 2026-01-02 04:23:26 -08:00
README.md docs: update readme 2026-01-01 19:01:01 -08:00
rednoise.cabal chore: cabal file 2026-01-02 04:03:26 -08:00
tailwind.config.js initial commit 2025-12-29 01:13:34 -08:00

rednoise

This repository is an experiment with rewriting my personal website using Hakyll. Originally, I had written my own static site generator in Rust, called Epilogue, with the express goal of using Typst's HTML export to generate all the pages.

9 months later, at the functor.systems winter hackathon, we figured out how to write a Typst compiler for the Hakyll system, which is a static site generator framework written in Haskell, wherein you specify build rules in a Haskell eDSL. This allowed the integration of the Typst rendering from Epilogue into a fully-featured static site generation infrastructure. This mostly obviated the need for my own SSG system and I began looking into porting my whole website to Hakyll and Haskell. I began by forking q9i/monadic, which was where we originally developed the Typst-Hakyll integration, and the liquidhaskell integration, but it has since diverged quite a bit, and, dare I say, become a bit more advanced than even monadi.cc.

After a few days of hacking, I have mostly succeeded, porting my website almost 1:1 to Hakyll. This has allowed me to leverage the features of Hakyll to trivially build blog features like RSS feeds and automatic feed generation, amongst other things, which were nontrivial features that would have required significant development effort in Epilogue that I had been putting off.

Along the way, I also replaced the Hakyll HTML templating system with blaze-html, an HTML combinator library for Haskell. The motivation for this was inspired by my use of the hypertext crate in Epilogue rather than a traditional HTML templating system, which implemented HTML templating as a Rust macro. I really liked the fact that I could program the HTML template in the exact same language the rest of the project was written in, so I integrated blaze-html into Hakyll, replacing the usual HTML templates. Due to the power and expressiveness of Haskell, blaze-html is simply implemented as a set of combinators in Haskell itself, without metaprogramming (more specifically, as a monad). The CSS is also slated to be written in the CSS monad, from clay, a CSS preprocessor which is implemented as a Haskell eDSL similar to blaze-html.

And all of this Haskell development has been done with the help of LiquidHaskell (LH), which refines Haskell's types with logical predicates to provide guarantees about the code. In some sense, the behavior of this website has been checked by a theorem prover.

Finally, I also developed a system for piping data from Hakyll back into Typst, which allows the Typst document to dynamically generate data based on the context passed in from Hakyll, for instance, to create an automatically generated list of recent posts on the homepage.

Once the final finishing touches are placed, the entirety of youwen5/web will be replaced by the contents of this repository, retiring Epilogue for good.

Once again, all of these efforts were done within the 2-week long functor.systems winter 2025 hackathon.