sydjs: static site generators

Post on 11-Jul-2015

1.449 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Static is not a dirty wordSydJS, 2013.10.23 / Ben Buchanan / @200okpublic

weblog.200ok.com.au

That's static websites.

You can argue about types (again) later.

"Why are you making a static site?! That's a bit old school isn't it?"

Everything old is new again.

Good use cases

● Small/medium sites● Blogs● Version-specific or bundled documentation

Use case: UI library

● Build it with its own templates● Docs and demos● Test pages

● Include docs in repo● pull requests can include code, tests and docs

● Versioned docs deployed at release

Bad use cases

● Anything else :-P● Things that actually should be an app.

Upsides of static

● Fast● Less moving parts (in prod)● Deploy anywhere

Downsides

● Dynamic content means oldschool scripting● "It just seems too simple."

"It just seems too simple."

...and anyway, "simple":

A few nodejs options

● Hexo*● Romulus*● Blacksmith, CabinJS, DocPad, Wintersmith... ● See modernstatic.com for a list

* As seen in JS Weekly ;)

Goes a liddle sumthin like this

● npm install -g name● name scaffold dirname && cd dirname● name generate● name server● name deploy

Look for...

● Clear setup, dev/test and deploy phases● Documentation● Your preference for:

● Templates● Preprocessors● Deployment options

● Proof of life (beware abandonware)

Example activity checkBlacksmith CabinJS Docpad Hexo Romulus Wintersmith

Age 2 years 5 months 2 years 1 year 1 year 2 years

Version 1.1.3 0.3.1 6.53.4 2.2.1 0.1.1 2.0.7

Active 3 months 1 week 2 weeks 1 week 5 months 2 weeks

PRs ~100 ~100 ~700 ~300 2 ~200

Forks 31 14 143 184 4 137

Watchers 49 10 98 86 20 61

Stars 450 115 1619 1145 156 1090

License MIT MIT MIT MIT MIT MIT

(collected 2013.10.19)

Static sites have their place.Embrace simple.

top related