Example Website

A website that demonstrates Superstructure

Build a Website with Superstructure

Building a website with Superstructure is (mostly) easy! Here's a little explanation to get you going!

Install Superstructure

  • Have node.js installed
  • Grab the example project
  • Install Superstructure by running npm install
  • Build by running npm start


To configure your website, you can do something like this in your index.js file:

// Require superstructure
const superstructure = require("superstructure");

// Set your configuration
const config = {
	// Name of your website
	name: 'Example Website',
	// What your website is about
	description: "A website that demonstrates Superstructure",
	// Canonical URL for your website
	siteUrl: 'https://github.com/Bradshaw/superstructure/example',
	// Where to put the generated website
	dest: './build',
	// Where all your content is
	root: './sources',
	// Files to copy verbatim
	public: 'public',
	// Page templates (must include a layout.pug template at least)
	templates: 'templates',
	// Stylesheets (written in sass)
	css: 'css',
	// Your articles (written in Markdown)
	articles: 'articles',
	// Images types to make compressed versions of 
	crunch: [".jpg",".png"],

		// Code you want to run when the build is done
		console.log("After build");

Posted May 14th, 2021