Building a website with Haskell, part 3
Hello! I’m back from a three-month posting hiatus. Together, the Haskell Platform OSX installer I’ve been working on and getting married have left me with precious little leftover project time.
In this post, I’ll describe the new simple content management system (code-named “Blaaargh”1) I’m now using to power the site.
Features & Requirements
I don’t need too many fancy features for this personal site. I don’t have much use for admin consoles or post editors; I’m most comfortable doing my editing in Emacs, and working with flat files. What I do need:
the ability to take a collection of marked-up text (pages/posts/articles) in a “content area” on the filesystem and have it published in HTML format using templates. (I chose markdown format on the basis of its ubiquity and the very convenient pandoc library)
the ability to syndicate an RSS/Atom feed for posts in a subdirectory, while excluding parts of the tree (static files, etc).
- templatable, via a tree of cascading templates corresponding to the content area files — for example, requesting
content/foo/bar/baz.mdwould cause us to search, in order:
the ability to deal with static files
requesting a directory will serve an “index template” instead, if it exists
reads configurable parameters (site title, base URL, hostname, directories to exclude from the feed, etc.) from a conf file.
Taking a look at the code…
In a few days I’ll write another post about the basic design of Blaaargh (and clean up the code a little!).
short for “weblaaargh”, of course, and chosen for its zombie feel ↩