Skip to content
SiteForge is a powerful static website generator built on Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SiteForge Build Status

Powerful Static Website Generator

What Is SiteForge?

SiteForge is a static website generator tool built around a set of assumptions around how a website is structured. It aims to provide more flexibility than previous solutions while still providing much of the power available in templating solutions.

SiteForge websites consist of a number of components, their design will be similar to those used in dynamic websites built using Jade and Express. Namely, a routing table, view templates and static resources.


SiteForge gives you the advantages usually only available with dynamic websites, namely the ability to generate content using templates and backing data stores, while still being able to serve static content - reducing server overhead and response times. It has been designed to be easily usable by anyone with experience using common web frameworks like Express.js, and integrates beautifully into your Continuous Deployment toolchain when paired with rsync.


  • Flexible Content Generation SiteForge makes it possible to generate complex static websites using generator functions, allowing you to generate static websites from dynamic data sources.
  • Static Resource Compilation Want to develop in LESS and deploy minified CSS? Do so easily using SiteForge's powerful static resource compilation framework with bundled support for LESS and Jade.

Example Website

var SiteForge = require('siteforge');

var forge = new SiteForge({
	views: './views',
	static: './static',
	output: './site'
}); = [
	{ title: 'Home', url: '/' },
	{ title: 'Projects', url: '/projects' }

var projects = {
	project1: { title: 'Project One', abstract: 'projects/project1/abstract' , view: 'projects/project1/page' }

// Expands :project path components into the array's values
forge.expansions.project = Object.keys(projects);

forge.routes = {
	'/': function() {
	'/projects': function() {
		this.locals.projects = projects;
	'/:project': function(project) {
		this.locals.project = projects[project];

// Compile website (static and "dynamic" content)

Hosting Websites

Hosting a SiteForge website is ludicrously simple, all you need is an installation of NGINX and a config file like the following.

server {
	listen 80;


	access_log /web/log/next_access.log;
	error_log /web/log/next_error.log;
	root /web/;

	error_page 404 = /errors/not_found.html;

	location / {
			if_modified_since exact;
			expires 1m;
			try_files $uri $uri/index.html =404;

	location /errors {
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.