Boilerplate for static site generation
25th March 2014 | by Adam Beres-Deak | static website, boilerplate
As I already mentioned before, I really like simple things like static webpages. To speed things up, I created a boilerplate, which can be used by anybody to generate static websites.
This blog is also statically generated. Statically generating websites has many advantages. Some of these are
- These sites can be hosted everywhere
- No backend to be hacked
- Outstanding performance
The boilerplate code can be found on GitHub: bdadam/static-site-boilerplate
What can this boilerplate do for you?
- It generates html from markdown files with the help of Assemble.
- It generates minified and optimized css file(s) with less and uncss
- During development the affected files are regenerated when something changes (GruntJS watch task)
- Local webserver with Livereload to immediately see what changes and what does it look like
How to use it?
- Clone this repository
git clone https://github.com/bdadam/static-site-boilerplate
- Install node dependencies
- Install bower dependencies
- Simply run
grunt buildto see that everything works
gruntfor starting "development mode"
- Then edit some files in the
contentfolder and watch the html being regenerated and automatically refreshed in the browser
What is planned for future releases?
- Adding some Handlebars helpers
- Maybe some more partials and templates
- Some real examples where you can see it in action
I would be glad to hear your feedback in the comments.
by Adam Beres-Deak
Latest blog posts
Displaying icons with custom elements 14th October 2015
After the first year of blogging - what happened on my blog in 2014? 1st January 2015
Better webfont loading with using localStorage and providing WOFF2 support 18th December 2014