Sitegen

A static site generator in MoonScript

$ sitegen new
->  made directory  www
->  made directory  templates
->  wrote  site.moon

$ sitegen page "Cool Things"
->  wrote  cool_things.md

$ sitegen
rendered  index.html      ->  www/index.html
rendered  cool_things.md  ->  www/cool_things.html
rendered  doc/ref.md      ->  www/doc/ref.html

$ sitegen deploy
    ->  uploading to:  leaf@leafo.net  www/sitegen
-- site.moon
require "sitegen"
site = sitegen.create_site =>
  deploy_to "leaf@leafo.net", "www/sitegen"

  @title = "Sitegen"
  @url = "http://leafo.net/sitegen/"

  add "index.html"
  add "doc/ref.md"

site\write!

About

Sitegen assembles webpages through a pipeline consisting of templates and pages.

Pages and templates can be written in html or markdown. The site is defined through the site.moon file, which is written in MoonScript. It describes all pages that need to be brought in, it can also specify configuration variables accessible within pages and templates.

Pages can be assigned any number of types, which lets your aggregate pages into groups. Enabling you to create blogs, among other things.

Sitegen has a plugin system that lets you transform the page as it travels through the pipeline. Letting you do things like syntax highlighting and automatically generated headers.

Sitegen uses the cosmo templating language to inject variables, run functions, and trigger actions in the body of the page as it is being created.

Install

$ luarocks build https://raw.github.com/leafo/sitegen/master/sitegen-dev-1.rockspec

View source on GitHub.