A personal blog built with Hakyll, a static site generator written in Haskell.
You need GHCup to install the Haskell toolchain (GHC and Cabal):
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | shInstall GHC and Cabal:
ghcup install ghc
ghcup install cabalAny recent GHC 9.x and Cabal 3.x will work.
If you prefer Nix, the repo includes a shell.nix that provisions GHC 8.8.3, Cabal, Hakyll, and ghcid:
nix-shell# Build the site executable
cabal v2-build
# Generate the static site
cabal v2-run site buildThe compiled site will be output to the _site/ directory.
Blog posts are stored in the posts/ directory and follow the naming convention:
YYYY-MM-DD-post-title.md
or
YYYY-MM-DD-post-title.markdown
Create a new file in posts/ with YAML frontmatter:
---
title: "Your Post Title"
---
Your post content here written in Markdown.After creating a new post, rebuild the site:
cabal v2-run site buildWatch for changes and rebuild automatically:
cabal v2-run site watchDeploy to production server (requires NGUBLAG_PEM_KEY environment variable):
./deploy.shThis uses rsync to sync the _site/ directory to the remote server.
.
├── site.hs # Main Hakyll configuration
├── ngublag-com.cabal # Cabal package file
├── shell.nix # Nix shell configuration
├── posts/ # Blog posts
├── templates/ # HTML templates
├── css/ # Stylesheets
├── images/ # Images
├── js/ # JavaScript files
└── _site/ # Generated site (build output)