Statix is a static website generator.
Statix uses Swig as the default templating engine (if you're familiar with Django, Jinja or Twig, you'll feel right at home).
The beauty of Statix is that it supports a lot of templating engines, so you can use whatever you want! (Thanks to consolidate.js).
Installation
$ npm install -g statix
Commands
Statix is super minimalistic and thus only has 3 commands.
$ statix new
$ statix build
$ statix server
statix new
$ statix new project-name
$ cd project-name
You can run statix new
from anywhere. Running statix new
will generate a new project-name
folder in the current directory. The generated folder will have a statix.js
file, and a couple
other files as an example.
Statix projects only need a statix.js
file at the root of the directory. After you're familiar with Statix, you'll probably want to create a template folder that has a more tailored statix.js
file and other boilerplate type stuff and instead of using statix new
you'll just
use that folder as a base for your projects.
If you open statix.js, you can see all the options available. Comments are included next to each property.
statix build
cd
into project name
and run statix build
. Compare the source
and deploy
directories to get an idea of what Statix is doing.
You can run statix build
in any directory that has a statix.js
file.
statix server
Statix has a local webserver, for convenience. This means that you can view your project without having to rebuild everytime.
$ cd project-name
$ statix server
By default Statix, binds the webserver to port 8000. You can change this by doing statix server -p 3000
Changing the Template Engine
Go into statix.js
and change
template_engine : "swig",
to
template_engine : "jade",
or
template_engine : "hogan",
Yep! It's that easy!
Note: Only template engines supported by consolidate.js will work. If you want support for another template engine, fork consolidate.js and issue a pull request.
These are the currently supported engines: