Rise of the

Static Site Generator

A presentation by Justin Mayer
Saturday, February 21, 2015

Use space bar to advance

Foundation

Basic familiarity with the command line

… will be useful ☺

Recognize

… this site?

Birth of the Web

It was a simpler time

First Web was static

Content mixed with tags

Not very DRY

Only for technical folks

Solution = CMS

HTML generated by server

Content stored in database

Web-based editor

Features are not free

Deployment

Web server

Application server

Database server

Maintenance

Upgrading application and database servers

Content versioning is hard

Migration is a pain

Stampeding herd

High-profile site links to you

Congratulations!

Your server just caught fire and died

Letting other people control
our devices is bad for us

Inviting the Trojan Horse Inside

Association for Computing Machinery

http://queue.acm.org/detail.cfm?id=2721993

“Dynamic systems are simply less secure”

A “Kick Me” sign on your site

CMS treats content as instructions

Attack via crafted blog post or comment

DDoS

Loss of simplicity

No longer “just files”

Static site generators

The sweet spot

All that is old

is new again

Remember Movable Type?

What is a static site generator?

Content as files

Templates and content blocks: DRY

Generate locally; sync to server

Static and self-contained

Formats

Markdown

reStructured Text

Asciidoc

Textile

Need for speed

Not waiting on CPU to generate the page

No reverse proxying

Web servers are optimized for static assets

Reliability

No app or DB server

Less moving parts

Less things to go wrong

Better control

Source content is on your machine

Easier backups, versioning, migration

More control over your data

Deployment

rsync

GitHub Pages

S3/CloudFront/Rackspace/Heroku

Pelican

Written in Python

Nearly 250 contributors

Thriving ecosystem

Plenty of options

https://staticsitegenerators.net/

386 of them listed (as of today)

Choose one that makes sense for you

Challenges

When are SSGs not a good fit?

Data-heavy sites

“Show me all large T-shirts in blue”

Limited interactivity

Example: contact forms

Extra generation step

Potentially an issue for huge sites

User experience

Not nearly as approachable
or user-friendly

Demonstration

On the horizon

Creative solutions to challenges

Caching and parallel I/O

Web-based editing

Live page reloading

Microservices

Self-hosted comments

Site search

Contact forms

Not done yet

Should be much more user-friendly

Want to hear about your experiences

Stay tuned

Summary

Simple, reliable, fast

Pairs well with microservices

Better control over your software and your data

Thanks!

Questions?

Justin Mayer — @jmayer

This presentation:
justinmayer.com/talks/scale13x/rise-static-site-generators/