Archive of: Static Websites

Handlebars 'each' block helper and json file

by Will Moody

 With the static website boilerplate which is here I have found that I can use Handlebars.js with its built in each block helper and a json file to simply create and edit various elements of a page.

Useful Mixins

by Will Moody

These are the mixins that come with the Static Website Boilerplate found here, they are a work in progress as I add to them when necessary.

Cache Busting Css and Js files

by Will Moody

Cache busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.

Scss includes for Grid Layout

by Will Moody


With Css Grid Layout being widely accepted for page and sub-page layouts, I had a need for main section of a page to contain full width and narrower sections.

Sitewide Handlebars Details

by Will Moody

Creating a details.yml file which looks like the one below helps greatly, this gives me a bunch of details which only have to be changed once to update all pages and partials.

Static Website Source Files

by Will Moody


Leading on from this post Static Website Boilerplate  here are more details of the src file structure used - my src file structure is as below, this keeps all things easily traceable.

Static Website Boilerplate

by Will Moody


Not all websites warrant a CMS such as Perch and are simply static sites where the content does not change, these can easily be built using a boilerplate. So I have just spent a few hours creating a static website boilerplate that will allow me to build a website very quickly with the minimum of fuss.