wormwood

wormwood

Event-driven template rendering inspired by Jekyll

Wormwood

Wormwood is an event-driven template rendering utility inspired by Jekyll. It's great for rendering markdown, e.g., a README file, as you edit.

Wormwood will:

  1. watch for changes to a template directory ( ./ by default)
  2. render the changed files (via Tilt) into a layout
  3. write the rendered, laid-out content to an output directory ( ./ by default).

Installation

$ gem install wormwood

Usage

  1. Create a file Tilt knows how to render, e.g., foo.md
  2. Run wormwood
  3. Edit foo.md and observe the creation of foo.html

Note: Wormwood will generate a file called <layout name>.erb in your source directory if a file named "layout" doesn't already exist. Feel free to hack it.

Configuration

Wormwood defines a few configuration options:

--source The directory containing the template and layout files. Defaults to "./"

--destination The directory to write rendered files to. Defaults to "./"

--layout The layout file name (without extension). Defaults to "layout".

--variable The name of the variable used to insert rendered content into the layout. Defaults to "content".

Developing

  1. Develop
  2. Build gem rake build
  3. Install gem rake install
  4. Run tests rake test

Changelog

  • 0.0.7 generates default layout
  • 0.0.6 adds layout support

License

Copyright 2013 Erik Eldridge

Licensed under the MIT License

jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer