April 3, 2012
Wintersmith - Static site generator powered by CoffeeScript, Jade, Underscore, and Node.js

thechangelog:

We’ve covered a few static site generators, not to mention a whole episode. Wintersmith from Johan Nordberg is the first to be powered Node.js. Feature highlights include:

  • Jade templates
  • Page metadata
  • Integrated Underscore provides the _ function in your templates
  • Markdown support
  • Command line interface
  • Built-in server

Perhaps the most powerful feature is Wintersmith’s CoffeeScript-based plugin system:

module.exports = (wintersmith, callback) -> class TextPlugin extends wintersmith.ContentPlugin constructor: (@_filename, @_text) -> getFilename: -> @_filename render: (locals, contents, templates, callback) -> # do something with the text! callback null, @_text TextPlugin.fromFile = (filename, base, callback) -> fs.readFile path.join(base, filename), (error, buffer) -> if error callback error else callback null, new TextPlugin filename, buffer.toString() wintersmith.registerContentPlugin 'texts', '**/*.txt', TextPlugin callback() 

Check out the project web site or source on GitHub for more.

(Source: thechangelog)

  1. haru012 reblogged this from thechangelog
  2. hackz0r reblogged this from thechangelog
  3. monyetbegok reblogged this from thechangelog
  4. thechangelog posted this