3
0
Fork
You've already forked haunt
0
A modified fork of Haunt, upstream is https://git.dthompson.us/haunt
  • Scheme 94.6%
  • Makefile 3%
  • Shell 1.3%
  • M4 1%
  • HTML 0.1%
Find a file
John Kehayias 5bf295b2bb
remove (haunt html) and use htmlprag instead
This is a breaking change. This removes any html/sxml parsing from
haunt by using htmlprag from guile-lib instead. A key fix from this
is that inline SVG is now properly parsed/output. Note that one might
want to set the parameter %strict-tokenizer? to #true, but this has
not been done here. These days that would be more expected in dealing
with HTML. For example, sometimes things like div tags are not closed
in the correct place when parsing HTML otherwise.
Breaking change is that its equivalent for sxml->html does not do
obj->string. Note in the example site that we need to convert to
string explicitly now.
Overall change is to replace (haunt html) with (htmlprag),
sxml->html-string with shtml->html, sxml->html with
write-shtml-as-html, and change the doctype declaration. The basic
html-reader is now greatly simplified.
(tests html) is not really needed, but adapted to htmlprag for now.
2025年08月08日 16:50:49 -04:00
doc Deprecate 'post' in (haunt skribe utils) in favor of 'document'. 2025年07月16日 08:16:04 -04:00
example remove (haunt html) and use htmlprag instead 2025年08月08日 16:50:49 -04:00
haunt remove (haunt html) and use htmlprag instead 2025年08月08日 16:50:49 -04:00
scripts Automatically add Haunt's modules to Guile's load path at startup. 2022年07月07日 21:56:17 -04:00
tests remove (haunt html) and use htmlprag instead 2025年08月08日 16:50:49 -04:00
.dir-locals.el Add .dir-locals.el file. 2022年12月06日 07:57:02 -05:00
.gitignore Automatically add Haunt's modules to Guile's load path at startup. 2022年07月07日 21:56:17 -04:00
bootstrap
configure.ac Bump version to 0.4.0. 2025年07月16日 08:16:04 -04:00
COPYING
guix.scm remove (haunt html) and use htmlprag instead 2025年08月08日 16:50:49 -04:00
Makefile.am remove (haunt html) and use htmlprag instead 2025年08月08日 16:50:49 -04:00
pre-inst-env.in pre-inst-env: export HAUNT_UNINSTALLED. 2023年11月12日 08:06:21 -05:00
README ui: Add 'new' subcommand. 2024年09月11日 08:14:39 -04:00
README.org README: Add a .org symlink. 2025年08月06日 23:04:28 -04:00
test-env.in
THANKS
TODO.org Add to TODO list. 2025年04月12日 11:41:02 -04:00

-- mode: org --

Haunt is a static site generator written in Guile Scheme. It's simple, functional, and extensible.

Features

  • Easy blog and Atom/RSS feed generation
  • Supports any markup language that can be parsed to SXML
  • Simple development server
  • Purely functional build process
  • User extensible

Example Configuration

 (use-modules (haunt site)
 (haunt reader)
 (haunt builder blog)
 (haunt builder atom)
 (haunt builder assets))
 (site #:title "Built with Guile"
 #:domain "example.com"
 #:default-metadata
 '((author . "Eva Luator")
 (email . "eva@example.com"))
 #:readers (list sxml-reader html-reader)
 #:builders (list (blog)
 (atom-feed)
 (atom-feeds-by-tag)
 (static-directory "images"))

Usage

Write a configuration file named haunt.scm. Add your posts to a directory named posts. Then run haunt build!

Alternatively, use the haunt new command to start a project from a template quickly.

To view your creation, run haunt serve and browse to localhost:8080. For quicker development cycles, run haunt serve --watch to automatically rebuild the site when things change.

Requirements

  • GNU Guile >= 2.0.11

Optional:

  • guile-reader (for Skribe support)
  • guile-commonmark (for CommonMark support)

Building from Git

Haunt uses the familiar GNU build system. GNU automake, autoconf, and make are required to build from a git checkout.

 ./bootstrap && ./configure && make

Once Haunt is built, it can be run directly from the source tree (no need to run make install) via the pre-inst-env script:

 ./pre-inst-env haunt --help

GNU Guix users can quickly create a build environment with all of the necessary dependencies using the handy guix environment tool:

 guix environment -l guix.scm

Example

An example Haunt site can be found in the example directory. To build it, run:

 cd example
 ../pre-inst-env haunt build

License

GNU GPLv3 or later. See COPYING for the full license text.