node.js based static page generator
CoffeeScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
default
docs
example
lib
LICENSE
README.md
package.json

README.md

Genstatic - A very simple static site generator

Very early days. Based on coffeescript and eco You can define templates, partials and data files.

Install

npm install genstatic

Run

Create an example directory via

genstatic example /path/to/example

Then you can run

genstatic process /path/to/example

to generate the website in example/www.

If you want to create an empty project

genstatic create /path/to/project

Variables inside the page

By default every page will have the following values set:

template (defaults to "index") filename basedir

Other variables can be set inside the file itself, by declaring them on top:

---
title = "Foo page"
---

Site wide variables can be set in config.coffee

Settings

These default to:

extension : '.html'
templates : './templates'
assets : './assets'
data : './data'
output : './www'

These values can be overwritten in config.coffee

Helpers

By default available is the partial helper

<%- @partial 'mytemplatename', { myvar : 'myvalue' } %>

Additional helpers can be defined in the file called helpers.coffee