1.2.3 • Published 10 years ago

siteforge v1.2.3

Weekly downloads
95
License
-
Repository
github
Last release
10 years ago

SiteForge Build Status npm.io

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.

Advantages

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.

Features

  • 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'
});

forge.locals.menu = [
	{ 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() {
		this.render('index');
	},
	'/projects': function() {
		this.locals.projects = projects;
		this.render('projects');
	},
	'/:project': function(project) {
		this.locals.project = projects[project];
		this.render('project');
	}
};

// Compile website (static and "dynamic" content)
forge.compile();
1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.12

10 years ago

1.1.11

10 years ago

1.1.10

10 years ago

1.1.9

10 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago