Make-based static website builder using Jade and Stylus
CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
skel
LICENSE
Makefile
README.md

README.md

Veil

Veil is a very simple boilerplate for writing static sites.

It uses Jade for templating, Stylus for CSS generation and GNU Make for the build system.

Install

# Create your project directory
$ mkdir my-website; cd my-website

# Download the Makefile
$ curl -sL https://raw.githubusercontent.com/madx/veil/master/Makefile -o Makefile

# Launch the setup task
$ make setup

Usage

Building the site requires exactly one command:

$ make
  • Pages are written with Jade and stored in sources/pages/. They will map to a file in your output dir (i.e. sources/pages/index.jadeoutput/index.html).
  • Stylesheets are written with Stylus and stored in sources/stylesheets/. They will map to a file in the assets/css/ folder of your output dir (i.e. sources/stylesheets/styles.styloutput/assets/css/styles.css).
  • Static assets from the static/ folder will be copied in the assets/ folder of your output dir, preserving subdirectories (i.e. static/js/app.jsoutput/assets/js/app.js).

watch

Provided you have installed either inotify-tools (Linux) or fswatch (OS X), you can use the watch task to continuously rebuild the site as you modify the source files.

$ make watch

Customisation

Almost every aspect of Veil is fully customisable though a config.mk file.

Creating this file allow you to override all built-in variables and most commands used during the build process.

You can, for example, change the templating system to another engine:

  1. Change the PAGE_EXT variable to the extension used by your template engine
  2. Redefine the page-cc canned recipe to use your command.
  3. There is no 3

Read the Makefile to learn what you can customise.

Here's an example config.mk for using Redcarpet as your templating engine:

PAGE_EXT = hbs

define page-cc
@ mkdir -p $(shell dirname $@)
@ redcarpet $< > $@
endef