Haunt is a simple, functional, hackable static site generator written in Guile Scheme that gives authors the ability to treat websites as programs.Download Haunt 0.2.1
Haunt isn't your average static site generator. Its mission is to give authors the full expressive power of Scheme to define every aspect of their websites are generated. Haunt uses a simple, functional build system that allows any type of web page to be built by writing procedures that return page objects.
Haunt has no opinion about what markup language authors should use to write posts. Just write the relevant reader procedure and Haunt will happily work with that format. Likewise, Haunt has no opinion about how authors structure their sites. Haunt ships with helpful builder procedures that generate simple blogs or Atom feeds, but authors should feel empowered to tweak them, write replacements, or add new builders to do things that the Haunt hackers didn't think of.
Here's what a simple Haunt configuration looks like:
(use-modules (haunt asset) (haunt builder blog) (haunt builder atom) (haunt builder assets) (haunt reader) (haunt reader skribe) (haunt reader texinfo) (haunt reader commonmark) (haunt site)) (site #:title "Built with Guile" #:domain "example.com" #:default-metadata '((author . "Eva Luator") (email . "firstname.lastname@example.org")) #:readers (list commonmark-reader texinfo-reader skribe-reader sxml-reader html-reader) #:builders (list (blog) (atom-feed) (atom-feeds-by-tag) (static-directory "images")))
With the above saved into a file named
haunt.scm and a
posts directory populated with the articles to publish,
the site can be built by running
haunt build. Once the site is built, running
haunt serve and visiting
localhost:8080 in a web browser will show the results of the build
without needing to upload the generated files to a web server.
Patches to fix bugs or add new functionality are
highly encouraged. In lieu of a mailing list, please send patches
org for now.
To get the latest version of the source code, clone the official git repository:
git clone git://dthompson.us/haunt.git