What's a Static Site Generator?
An SSG is a program that processes text files and outputs an HTML website
- Content is usually written in Markdown
- A small amount of YAML at the top of files to set variables
- Layout files + a templating language
Why use an SSG?
- Fast! static files get served at lightning speed
- Portable a flat HTML website can be hosted anywhere, and plain text “source” files can be edited and stored easily, too
- Secure no database, no code, just
.html and folders
Edit regular old text files, just like in the olden days! (Actually, being able to use any editor you like, and write in Markdown, is a real pleasure)
How do I get started?
- GitHub Pages is the easiest way to get started
- A number of SSGs support publishing directly to GitHub
- Jekyll is the SSG that powers GitHub Pages
| |-- default.html
| `-- post.html
| |-- 2007-10-29-play-nethack.md
| `-- 2009-04-26-barcamp-boston-4-roundup.md
What are some other SSGs?
There are a lot of of SSGs written in every language you can think of. As an end user, you just have to be able to get your chosen tool installed. Ruby, Python, and Node.js are all easy to install and run as needed.
My Personal Setup
- I use Octopress - a framework built on top of Jekyll
- Powers my blog (hosted on Heroku - simple as git push)
- Powers my main site / archive (hosted on Amazon S3)
- We ran Polyglot Conf directly on GitHub Pages - see github.com/PolyglotConf/polyglotconf.github.com to check out the source
- Byword is my Markdown editor of choice – I keep my blog files in Dropbox so I can create & edit from anywhere
- I’m experimenting with node.js and wrote a post about Node based SSGs
- This presentation was done using Hekyll, a Jekyll + impress.js presentation make
- Being able to easily host a handful of pages in seconds – with no long-term maintenance – is awesome
- The layouts are “plain” HTML aside from a handful of simple template tags – no more learning / being restricted by CMS theme layers
- Still pretty geeky, but learnable by anyone