Now Powered by Hx
I looked at a number of different software packages to replace Hobix, but none of them really appealed. The best two candidates were Jekyll and Whisper, but Jekyll is a little too heavily focused on blogging specifically (a problem with Hobix too, though it wasn’t quite as bad), and Whisper isn’t a static site generator.
So, in classic NIH tradition, I eventually wrote my own static site generator, Hx. It’s pretty raw and not especially fast (though it does the job faster than Hobix), but it’s pretty straightforward and flexible. It has no particular baked-in knowledge of what a “blog” is: it’s just a graph of generic filters which enumerate pairs of paths and documents. Throw in liquid templates, and it’s enough to do everything I need for now.
For the curious, here’s what the hx-config.yaml for
this site presently looks like:
---
require:
- site-hacks
options:
base_url: http://moonbase.rydia.net/
template_dir: templates
output_dir: site
lib_dir: lib
links:
- url: http://twitter.com/mentalguy
name: "@mentalguy"
- url: http://inkscape.org/
name: "Inkscape"
- url: http://lastbus.rydia.net/
name: "The Last Bus"
- url: http://rydia.net/
name: "rydia.net"
default_author: mental
sources:
entries:
filter: Hx::Backend::Hobix
options:
entry_dir: entries
only: mental/blog/**
sort_by: created
reverse: true
cache: true
blog: # alias for editing
source: entries
strip_prefix: mental/blog/
indexes:
source: entries
filter: Hx::Listing::RecursiveIndex
cache: true
front_page:
- source: indexes
only: index
- filter: Hx::Listing::Paginate
options:
page_size: 10
sections:
- source: indexes
except: index
- filter: Hx::Listing::Paginate
options:
page_size: 40
feeds:
source: entries
filter: Hx::Listing::RecursiveIndex
options:
limit: 10
only:
- index
- mental/index
- mental/blog/index
outputs:
- source: entries
filter: Hx::Output::LiquidTemplate
options:
extension: html
template: blog-entry.liquid
- source: front_page
filter: Hx::Output::LiquidTemplate
options:
extension: html
template: front-page.liquid
- source: sections
filter: Hx::Output::LiquidTemplate
options:
extension: html
template: section-index.liquid
- source: feeds
filter: Hx::Output::LiquidTemplate
options:
extension: atom
template: atom-feed.liquid
I won’t be doing any serious public releases of Hx for a while since I’m still smoothing out a lot of rough areas and there are sure to be incompatible changes in the process, but you’re welcome to poke around on your own.