The Biggies (PHP Rules!)
On your live production site requires
On every request - (re)builds the page on-the-fly e.g. queries the database, runs scripts, merges templates, etc.
On your live production site requires
web server (e.g. apache, ngnix, etc.) only
Note: You can even go “server-less” e.g. host your site on a web service e.g. Amazon S3 (Simple Storage Service).
You build the complete site, that is, all pages “ahead-of-time” on a “build” machine. You will end-up with a bunch of (static) ready-to-use HTML, CSS and JS files (*). Upload to production site and you’re live w/ a kind of “super cache”.
(*) and media files e.g. graphics, music recordings, etc.
The Biggies in 1999
And today?
Why not build (another) blog w/ React.js in 5 minutes? The world’s 1st Gatsby site?
Bricolage (web: bricolage.io, github: KyleAMathews/blog) - a blog written by Kyle Mathews who lives and works in San Francisco building useful things.

Q: The Great Gatsby by __ ?
Q: Last Update In (Static Since) __ ?

The Great Gatsby is a 1925 novel written by American author Francis Scott Fitzgerald … a portrait of the Jazz Age or the Roaring Twenties …
(Source: Wikipedia - The Great Gatsby)
Gatsby is a JavaScript package using Webpack, React, React-Router, Markdown and more to let you build static (web)sites. Use npm to install e.g.:
$ npm install -g gatsby
Try:
$ gatsby -h
prints
$ gatsby -h
Usage:
gatsby [command] [options]
Available Commands:
new [rootPath] [starter] Create new Gatsby project.
develop [options] Start development server. Watches files and rebuilds and hot reloads
if something changes
build [options] Build a Gatsby project.
serve-build [options] Serve built site.
Options:
-h, --help output usage information
-V, --version output the version number
To get started use:
$ gatsby new blog https://github.com/gatsbyjs/gatsby-starter-blog
Basically the same as:
$ git clone https://github.com/gatsbyjs/gatsby-starter-blog
$ cd gatsby-starter-blog
$ npm install
To test drive use:
$ gatsby develop
And open the browser. Voila.
Shows how-to-use:

No. 1 Selling Point - Hot (!) Reloading - Thanks to Webpack
Works for:
Does NOT Work for:
│ config.toml
| html.js
| package.json
├───components/
│ Footer.js
│ Header.js
│ LinkList.js
│ PostList.js
├───css/
| style.css
├───data/
| links.js
├───pages/
| | 404.md
| | index.js
| | _template.js
| ├───pages/
| | about.md
| └───posts/
| 2014-11-11-new-repo-maps.md
| 2014-12-12-new-build-system.md
| 2015-08-25-new-season.md
| _template.js
└───wrappers/
md.js
(Source: staystatic/gatsby)
YAML + Markdown
---
title: "beer.db - New Repo /maps - Free 'Full-Screen' Interactive Beer Maps w/ Brewery Listings"
date: 2015-08-25
layout: post
path: "/posts/new-repo-maps/"
---
The beer.db project - offering free public domain beer, brewery
and brewpubs data - added a new repo, that is, `/maps`
for hosting 'full-screen' interactive beer maps with brewery listings.
See an example [beer map for Austria](http://openbeer.github.io/maps/at)
(~200 breweries n brewpubs) live or
[check the source](https://github.com/openbeer/maps) using the mapbox.js mapping library.
...
YAML + Markdown
---
title: About
path: "/about/"
---
Gatsby Static Site Sample. Shows how to use:
1. Pages (see `pages/pages/about.md`)
2. Posts (see `pages/posts/*.md`)
3. Custom Content Types (see `data/links.js`)
(Source: staystatic/gatsby/pages/pages/about.md)
markdown-it ★1 858 by Vitaly Puzrin, Alex Kocharin et al (github: markdown-it/markdown-it)
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
Extensions / Goodies Include:
Feature | Gatsby
------------------------ | ------------
Settings / Configuration | TOML
Front Matter / Meta Data | YAML
Datafiles | JavaScript
HTML Templates | JSX
HTML "Shortcodes" | Markdown
becomes
| Feature | Gatsby |
|---|---|
| Settings / Configuration | TOML |
| Front Matter / Meta Data | YAML |
| Datafiles | JavaScript |
| HTML Templates | JSX |
| HTML “Shortcodes” | Markdown |
```
// Enable everything
var md = require('markdown-it')({
html: true,
linkify: true,
typographer: true,
});
```
This is a footnote.[^1]
[^1]: the footnote text.
becomes
This is a footnote. 1
Datafile - JavaScript
//////////////////////////
// Links 'n' Bookmarks
export default [
{ title: "football.db - Open Football Data",
url: "https://github.com/openfootball" },
{ title: "beer.db - Open Beer, Brewery 'n' Brewpub Data",
url: "https://github.com/openbeer" },
{ title: "world.db - Open World Data",
url: "https://github.com/openmundi" }
]
(Source: staystatic/gatsby/data/links.js)
Templates - React HTML Web Components
class LinkList extends React.Component {
render() {
const {links} = this.props;
return (
<ul>
{links.map( link => <li><a href={link.url}>{link.title}</a></li> )}
</ul>
)
}
}
// Use like:
// <LinkList links={links}/>
(Source: staystatic/gatsby/components/LinkList.js)
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
class PostList extends React.Component {
render () {
const {posts} = this.props;
return (
<ul>
{posts.map( post => <li><Link to={prefixLink(post.path)}>{post.data.title}</Link></li> )}
</ul>
)
}
}
// Use like:
// <PostList posts={posts}/>
Templates - React HTML Web Components
import Header from 'components/Header'
import Footer from 'components/Footer'
class MasterTemplate extends React.Component {
render() {
return (
<div>
<Header/>
<div>
{this.props.children}
</div>
<Footer/>
</div>
)
}
(Source: staystatic/gatsby/pages/_templates.js)
class Footer extends React.Component {
render() {
return (
<div id="footer">
A <a href="http://staystatic.github.io">Stay Static</a> Sample Site
</div>
)
}
}
(Source: staystatic/gatsby/components/Footer.js)
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import { config } from 'config'
class Header extends React.Component {
render() {
return (
<div id="header">
<table style={{width: "100%"}}>
<tbody>
<tr>
<td>
<Link to={prefixLink('/')}>{ config.siteTitle }</Link>
</td>
<td style={{textAlign: "right"}}>
<Link to={prefixLink('/about/')}>About</Link>
</td>
</tr>
</tbody>
</table>
</div>
)
}
}
(Source: staystatic/gatsby/components/Header.js)
TOML
siteTitle = "Gatsby Stay Static Site Sample"
linkPrefix = "/sites/gatsby"
(Source: staystatic/gatsby/config.toml)
| - | Gatsby |
|---|---|
| GitHub Stars (+1s) | ★3 071 |
| Settings / Configuration | TOML |
| HTML Templates | React |
| . Layouts | React |
| . Includes | React |
| Front Matter / Meta Data | YAML |
| Datafiles | JavaScript |
| CSS Preprocessing | PostCSS etc. |
| HTML “Shortcodes” | Markdown |
$ gatsby build
results in
Generating CSS
Generating Static HTML
Compiling production bundle.js
Copying assets
File Structure in /public:
| 404.html
| bundle.js
| bundle.js.map
| index.html
| styles.css
├───about/
| index.html
└───post/
├───new-build-system/
| index.html
├───new-repo-maps/
| index.html
|
└───new-season/
index.html
Fast, Faster, Fastest
Simple, Simpler, Simplest
Pretty, Prettier, Prettiest
Bonus: Secure e.g. just a bunch of (static) files on your server.
Some Articles:
Stay Static Sample Sites (Showcase)
Stay Up-To-Date - Follow Along
StaticGen.com

Phenomic (web: phenomic.io, github: MoOx/phenomic) ★823 by Maxime Thirouin et al
Leo (github: superawesomelabs/leo) ★15 by Christopher Biscardi et al
And others.
Next meetup in fall 2016. Free. Everyone Welcome.
Example talks from last July meetup include:
More info viennahtml.github.io »