Hakyll
Hakyll is a free Haskell library for generating static sites, aimed mainly at small-to-medium sites and personal blogs.
What Hakyll is
Hakyll is a free Haskell library for generating static sites, aimed mainly at small-to-medium sites and personal blogs. A site is configured with a Haskell embedded domain-specific language, then declarative rules select resources and the compilers used to build them. Hakyll tracks dependencies to determine build order and supports incremental builds, compiling content into HTML files ready to upload. Pandoc integration provides Markdown and TeX support, while the compiler tutorial also covers Markdown and reStructuredText input. Built-in compiler examples include copying files, compressing CSS, and rendering content as HTML. Routes can preserve filenames, change extensions, or use custom logic. Templates support metadata and context fields, conditionals, partials, and loops. Tutorial material covers RSS, Atom, and JSON feeds. When included, a watch command can build and preview a site locally at localhost:8000. Installation is available through Cabal or Stack, with linked packages for Debian, Fedora, and Arch. Hakyll uses a BSD license, though the project notes that using Pandoc means the user's code needs a GPL-compatible license. Incremental builds do not detect edits to site.hs; the configuration must be recompiled before rebuilding.
Good
- Free and available under a BSD license.
- Compiles site content into deployable HTML.
- Supports Markdown and TeX through Pandoc.
- Includes incremental builds and dependency tracking.
- Offers a local preview command.
Watch out
- Primarily aimed at small-to-medium sites and personal blogs.
- Incremental builds do not detect edits to site.hs.
- Using Pandoc requires a GPL-compatible code license.
Who it suits
Hakyll suits Haskell users building small-to-medium static sites or personal blogs. It is a fit for people comfortable configuring builds with Haskell and declarative rules.
Verdict
Hakyll offers Haskell-based configuration, content compilation, and local preview for static-site projects. Its stated site scope and the configuration-rebuild limitation are worth considering before adopting it.
The facts
Each one read from Hakyll's own pages, with the date it was checked.
What it does
- Audience
- The maker describes Hakyll as mostly aimed at small-to-medium sites and personal blogs.checked 5 Oct 2001
- Build and deploy
- Hakyll compiles site content to HTML for upload.checked 5 Oct 2001
- Build rules
- Declarative rules use dependency tracking to determine the order in which items are built.checked 4 Oct 2001
- Compilers
- Built-in compiler examples include copying files, simple CSS compression, and rendering Markdown or reStructuredText to HTML with Pandoc.checked 5 Oct 2001
- Configuration
- Sites are configured with a customizable Haskell DSL.checked 5 Oct 2001
- Content formats
- Pandoc integration provides support for Markdown and TeX, including syntax highlighting.checked 5 Oct 2001
- Content sources
- markdownchecked 20 Sep 2001
- Feeds
- The tutorial series includes instructions for producing RSS, Atom, and JSON feeds.checked 5 Oct 2001
- Incremental builds
- The FAQ says a normal build is incremental, while changes to site.hs require recompiling the configuration and rebuilding.checked 4 Oct 2001
- Install methods
- The maker lists installation through Cabal or Stack and links Linux distribution packages for Debian, Fedora, and Arch.checked 5 Oct 2001
- Integrations
- The official site describes Pandoc integration and lists utility projects for Agda, Sass, Elm, hyphenation, and converting from other blog engines.checked 4 Oct 2001
- License
- Hakyll is available under a BSD license; the maker notes that using Pandoc means site code must use a GPL-compatible license.checked 5 Oct 2001
- Limit
- The project says it is mostly aimed at small-to-medium sites and personal blogs.checked 4 Oct 2001
- Local preview server
- Yeschecked 20 Sep 2001
- Maintainer
- The about page says Hakyll was originally written by Jasper Van der Jeugt, who still maintains the package.checked 5 Oct 2001
- Notable limitation
- The FAQ says incremental builds do not detect edits to site.hs, so the configuration must be recompiled before running rebuild.checked 5 Oct 2001
- Output
- Hakyll compiles site content into HTML files ready to deploy.checked 4 Oct 2001
- Preview server
- The installation guide describes a watch command that builds and previews the site locally at localhost:8000 when the preview server is included.checked 5 Oct 2001
- Product type
- Hakyll is a Haskell library for generating static sites, mainly aimed at small-to-medium sites and personal blogs.checked 4 Oct 2001
- Purpose
- Hakyll is a Haskell library for generating static sites, aimed mostly at small-to-medium sites and personal blogs.checked 5 Oct 2001
- Routing
- Routes can preserve filenames, change extensions, or apply custom routing logic.checked 4 Oct 2001
- Rules and dependency tracking
- Declarative rules select resources and their compilers, while dependency tracking determines build order.checked 5 Oct 2001
- Security
- The project describes static sites as fast, secure, easy to deploy, and manageable using version control.checked 4 Oct 2001
Money
- Free plan
- Yeschecked 20 Sep 2001
Alternatives to Hakyll
- 1

Gatsby
Free planWebAPISelf-hosted8.1From $9 a month - 2
Jekyll
Free planOpen sourceWebLinuxmacOSSelf-hosted8.1Free plan - 3

Cecil
Free planLinuxmacOSWindows7.4Free plan - 4

Eleventy
Free planLinuxmacOSSelf-hostedWindows7.4Free plan - 5

Nikola
Free planLinuxmacOSSelf-hostedWindows7.4Free plan - 6

Publii
Free planLinuxmacOSWindows7.3Free plan
