Hakyll, a static site generator in Haskell

Installation

Assuming you have Haskell already installed, you can type:

cabal update cabal install -j hakyll

Starting a new blog

Navigate to the directory above where you’d like to create your blog and type:

hakyll-init blog

Generating the site

The file site.hs holds the configuration of your site, as an executable Haskell program. We can compile and run it like this:

$ cd blog $ ghc --make -threaded site.hs
$ ./site build
$ ./site watch

Check it all in to git

First, add a few things to a new .gitignore file:

_cache site site.hi site.o
git init git add . git commit -m 'initial commit of blog'

Add Bitbucket as a remote

Click on Create New Repository and create a new repo on bitbucket.

git remote add origin git@bitbucket.org:BITBUCKET-USERNAME/REPONAME.git

Deploy your site via Aerobatic

Deploying your site via Aerobatic as is a simple as setting up the plugin to point to the _site directory.

Hooray for Haskell! Your site is hosted!

--

--

Coding and Teaching Functional Web Development, Entrepreneurship, and Sustainability. Crazy about Standup Paddleboarding.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ivan Storck

Ivan Storck

Coding and Teaching Functional Web Development, Entrepreneurship, and Sustainability. Crazy about Standup Paddleboarding.