Haunt is a simple, functional, hackable static site generator that gives authors the ability to treat websites as Scheme programs.

crudely drawn ghost

By giving authors the full expressive power of Scheme, they are able to control every aspect of the site generation process. Haunt provides a simple, functional build system that can be easily extended for this purpose.

Haunt has no opinion about what markup language authors should use to write posts, though it comes with support for the popular Markdown format. Likewise, Haunt has no opinion about how authors structure their sites. Though it comes with support for building simple blogs or Atom feeds, authors should feel empowered to tweak, replace, or create builders to do things that aren't provided out-of-the-box.


Here's what a simple Haunt configuration looks like:

(use-modules (haunt asset)
             (haunt builder blog)
             (haunt builder atom)
             (haunt builder assets)
             (haunt reader commonmark)
             (haunt site))

(site #:title "Built with Guile"
      #:domain "example.com"
      '((author . "Eva Luator")
        (email  . "eva@example.com"))
      #:readers (list commonmark-reader)
      #:builders (list (blog)
                       (static-directory "images")))

In a new directory, save the above to a file named haunt.scm.

Create subdirectories named posts and images.

Add the following to a new file named posts/hello.md:

title: First post!
date: 2018-03-13 18:00
tags: hello
summary: hello!

Hello, world!

Run haunt build to build the site.

Run haunt serve to a launch a web server to preview your work.

Open http://localhost:8080 in your web browser and smile, because you've just generated your first Haunt site!

Check out other sites built with Haunt over at awesome.haunt.page!


View the reference manual




To install Haunt with the GNU Guix package manager, run:

guix install haunt

To build and install Haunt from source, run:

wget https://files.dthompson.us/releases/haunt/haunt-0.3.0.tar.gz
tar xf haunt-0.3.0.tar.gz
cd haunt-0.3.0
make install



Git Repository

Haunt is developed using the Git version control system. The official repository is hosted at https://git.dthompson.us/haunt.git.

To clone the repository, run:

git clone https://git.dthompson.us/haunt.git


Real-time discussion for Haunt can be found on the #guile channel on the Libera.chat IRC network


Send patches and bug reports to davet@gnu.org.