hakyll-init
Initialize a new Hakyll project
TLDR
Generate a new Hakyll sample blog
Display help
SYNOPSIS
hakyll-init [DIRECTORY]
PARAMETERS
DIRECTORY
Target directory for new site (defaults to current directory)
DESCRIPTION
Hakyll is a Haskell static site generator library. The hakyll-init command scaffolds a complete starter project for building static websites with Hakyll.
It creates a standard directory structure including:
• site.hs: Main compiler script.
• _site/: Output directory for generated site.
• posts/: Markdown blog posts.
• templates/: HTML templates.
• static/: CSS, JS, images.
• Makefile: Build, clean, preview targets.
This template provides a functional example site out-of-the-box. Run make to build, make serve for local server. Customize by editing files and recompiling. Ideal for blogs, documentation, portfolios. Requires Haskell toolchain (ghc, cabal or stack) with Hakyll installed.
CAVEATS
Overwrites existing files in target directory without warning. Requires Hakyll executable in PATH (install via cabal install hakyll).
INSTALLATION
cabal update && cabal install hakyll
Or with Stack: stack install hakyll
QUICK START
hakyll-init mysite
cd mysite
make (build)
make serve (preview at http://localhost:8000)
HISTORY
Introduced in Hakyll 4.0 (2014) by Jasper van der Jeugt. Evolved with Hakyll versions; current in v4.15+. Simplified project setup replacing manual boilerplate.


