Rise of the

Static Site Generator

A presentation by Justin Mayer
@jmayer • justinmayer.com • github.com/justinmayer

Use space bar to advance

Introduction

Justin Mayer • @jmayer • justinmayer.com

Pelican • @getpelican • getpelican.com

Monitorial • @monitorial • monitorial.net

Upriise • @upriise • upriise.com

Recognize

… this site?

Why?

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

Content stored in database

Web-based editor

HTML dynamically generated by server

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

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

http://www.gniibe.org/memo/software/web/pelican/intro-ja.html

http://blog.sotm.jp/2014/01/03/moving-blog-wordpress-to-pelican/

http://osanai.org/74/

http://memo.laughk.org/2014/08/10/tinker2pelican-repo.html

http://blog.tai2.net/pelican-impression.html

https://www.ainoniwa.net/pelican/

http://blog.tekito.org/2013/12/16/setting-up-a-blog-with-pelican/

http://ulthar.com/category/pelican.html

Plenty of options

https://staticsitegenerators.net/

393 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

On the horizon

Creative solutions to challenges

Caching

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

Please help!

https://github.com/getpelican/pelican

Summary

Simple, reliable, fast

Pairs well with microservices

Better control over your software and your data

Thank you!

Justin Mayer • @jmayer • justinmayer.com

Pelican • @getpelican • getpelican.com

Monitorial • @monitorial • monitorial.net

Upriise • @upriise • upriise.com