A personal blog built with Hakyll, a static site generator written in Haskell.
You need Nix installed to set up the development environment.
Enter the development environment:
nix-shellThis will set up GHC 8.8.3, Cabal, Hakyll, and ghcid.
# Build the site executable
cabal build
# Generate the static site
cabal 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 run site buildWatch for changes and rebuild automatically:
cabal 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)