Workshop: Netlify & Static Site Generators

A presentation at Fronteers Workshop: Netlify & Static Site Generators in January 2019 in Utrecht, Netherlands by Phil Hawksworth

Slide 1

Slide 1

STATIC SITE GENERATORS AND NETLIFY PHIL HAWKSWORTH

Slide 2

Slide 2

netlify Fronteers Workshop January 2019 @philhawksworth NEED TO SET UP GITHUB? 👉 findthat.at/setup

Slide 3

Slide 3

STATIC SITE GENERATORS AND NETLIFY PHIL HAWKSWORTH

Slide 4

Slide 4

netlify Fronteers Workshop January 2019 @philhawksworth PHIL HAWKSWORTH HEAD OF DEVELOPER RELATIONS, NETLIFY

Slide 5

Slide 5

netlify Fronteers Workshop January 2019 @philhawksworth @ PHIL HAWKSWORTH HEAD OF DEVELOPER RELATIONS, NETLIFY

Slide 6

Slide 6

netlify Fronteers Workshop CONCEPT January 2019 @philhawksworth EXAMPLE EXERCISE

Slide 7

Slide 7

netlify Fronteers Workshop January 2019 @philhawksworth BEFORE WE BEGIN GITHUB ACCOUNT / GIT INSTALLED / NODE INSTALLED / YARN INSTALLED

Slide 8

Slide 8

netlify Fronteers Workshop January 2019 @philhawksworth ! s i h t o d s ’ t le

Slide 9

Slide 9

netlify Fronteers Workshop January 2019 @philhawksworth ECOSYSTEM CONTENT / ASSETS / AUTHENTICATION / E-COMMERCE / SEARCH

Slide 10

Slide 10

netlify Fronteers Workshop January 2019 @philhawksworth BROWSERS EVERGREEN / RICH APIS / OFFLINE / PERFORMANCE / STANDARDISATION

Slide 11

Slide 11

netlify Fronteers Workshop January 2019 @philhawksworth INFRASTRUCTURE TOOLING / CDN / CI/CD / AUTOMATION / TRIGGERS / EVENTS

Slide 12

Slide 12

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 13

Slide 13

netlify Fronteers Workshop January 2019 @philhawksworth RENDERING SOMEWHERE SERVER RENDER / CLIENT RENDER / PRE-RENDER

Slide 14

Slide 14

netlify Fronteers Workshop January 2019 @philhawksworth s v PRE-RENDERED STATIC

Slide 15

Slide 15

netlify Fronteers Workshop January 2019 @philhawksworth vs STATIC DYNAMIC

Slide 16

Slide 16

netlify Fronteers Workshop c i m a n y d c i t a st January 2019 CDN @philhawksworth LOAD BALANCER WEB SERVERS DB SERVERS

Slide 17

Slide 17

netlify Fronteers Workshop January 2019 @philhawksworth STATIC s n ea m CAPABLE OF BEING SERVED DIRECTLY FROM A CDN

Slide 18

Slide 18

netlify Fronteers Workshop January 2019 @philhawksworth k c a t s m ja

Slide 19

Slide 19

netlify Fronteers Workshop January 2019 @philhawksworth JAMSTACK ENABLERS

Slide 20

Slide 20

netlify Fronteers Workshop January 2019 @philhawksworth ECOSYSTEM CONTENT / ASSETS / AUTHENTICATION / E-COMMERCE / SEARCH

Slide 21

Slide 21

netlify Fronteers Workshop January 2019 @philhawksworth BROWSERS EVERGREEN / RICH APIS / OFFLINE / PERFORMANCE / STANDARDISATION

Slide 22

Slide 22

netlify Fronteers Workshop January 2019 @philhawksworth INFRASTRUCTURE c TOOLING / CDN / CI/CD / AUTOMATION / TRIGGERS / EVENTS

Slide 23

Slide 23

netlify Fronteers Workshop OUR FOCUS January 2019 @philhawksworth WORKING WITH SSGs WORKING WITH NETLIFY

Slide 24

Slide 24

netlify Fronteers Workshop January 2019 @philhawksworth SSG

Slide 25

Slide 25

netlify Fronteers Workshop January 2019 HOSTING LOCAL STATIC SERVER BUILD CONTENT TEMPLATES DATA @philhawksworth CDN

Slide 26

Slide 26

Slide 27

Slide 27

netlify Fronteers Workshop January 2019 @philhawksworth ! s k n a th

Slide 28

Slide 28

netlify Fronteers Workshop January 2019 @philhawksworth HOW TO CHOOSE? t h g i r e h t SSG

Slide 29

Slide 29

netlify Fronteers Workshop STATICGEN.COM January 2019 @philhawksworth

Slide 30

Slide 30

netlify Fronteers Workshop January 2019 @philhawksworth LANGUAGE WORKFLOW PERFORMANCE ARCHITECTURE OUTPUT CONTROL ADOPTION

Slide 31

Slide 31

netlify Fronteers Workshop January 2019 @philhawksworth JEKYLL HUGO GATSBY NEXT NUXT VUEPRESS

Slide 32

Slide 32

netlify Fronteers Workshop January 2019 @philhawksworth OUR SSG FOR TODAY ELEVENTY 👋

Slide 33

Slide 33

netlify Fronteers Workshop January 2019 @philhawksworth WHY ELEVENTY? LOGICAL ARCHITECTURE FLEXIBLE TEMPLATING NOTHING YOU DON’T ASK FOR JAVASCRIPT ALL THE WAY DOWN

Slide 34

Slide 34

netlify Fronteers Workshop January 2019 HOSTING LOCAL STATIC SERVER BUILD CONTENT TEMPLATES DATA @philhawksworth CDN

Slide 35

Slide 35

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 36

Slide 36

netlify Fronteers Workshop January 2019 @philhawksworth GIT-BASED DEPLOYMENTS

Slide 37

Slide 37

netlify Fronteers Workshop January 2019 @philhawksworth NETLIFY LOCAL CDN STATIC SERVER BUILD GIT BUILD

Slide 38

Slide 38

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE First look at Eleventy site structure

Slide 39

Slide 39

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE First build, then first deploy

Slide 40

Slide 40

netlify Fronteers Workshop January 2019 @philhawksworth MINIMUM VIABLE SITE 👉 findthat.at/repo

Slide 41

Slide 41

netlify Fronteers Workshop January 2019 @philhawksworth ABOUT THE FOLDERS

Slide 42

Slide 42

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 43

Slide 43

netlify Fronteers Workshop January 2019 @philhawksworth ATOMIC DEPLOYS

Slide 44

Slide 44

netlify Fronteers Workshop January 2019 @philhawksworth IMMUTABLE DEPLOYS

Slide 45

Slide 45

netlify Fronteers Workshop January 2019 @philhawksworth ADDRESSABLE DEPLOYS

Slide 46

Slide 46

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE Add pages, edit navigation

Slide 47

Slide 47

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE Modify site , deploy, rollback

Slide 48

Slide 48

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 49

Slide 49

netlify Fronteers Workshop January 2019 @philhawksworth DATA ABSTRACTION

Slide 50

Slide 50

netlify Fronteers Workshop January 2019 @philhawksworth CONTENT APIS NETLIFY LOCAL CDN STATIC SERVER BUILD GIT BUILD

Slide 51

Slide 51

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE add medium, local seed, targets

Slide 52

Slide 52

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE add medium, local seed, targets

Slide 53

Slide 53

netlify Fronteers Workshop January 2019 @philhawksworth DATA TO/FROM NETLIFY

Slide 54

Slide 54

netlify Fronteers Workshop January 2019 @philhawksworth FORMS

Slide 55

Slide 55

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE propose meet up form

Slide 56

Slide 56

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE add a form and some entries

Slide 57

Slide 57

netlify Fronteers Workshop January 2019 @philhawksworth NETLIFY API 👉 findthat.at/api

Slide 58

Slide 58

netlify Fronteers Workshop January 2019 @philhawksworth AUTH AND ENVIRONMENT VARIABLES

Slide 59

Slide 59

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE get proposal data from API

Slide 60

Slide 60

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE create auth tokens, get proposal data from API locally and in prod

Slide 61

Slide 61

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 62

Slide 62

netlify Fronteers Workshop January 2019 @philhawksworth EVENTS AND WEBHOOKS ARE WHERE THE FUN IS!

Slide 63

Slide 63

AUTOMATION AND LOW FRICTION

Slide 64

Slide 64

Slide 65

Slide 65

Slide 66

Slide 66

Slide 67

Slide 67

Slide 68

Slide 68

SETYOURWATCHBY.NETLIFY.COM

Slide 69

Slide 69

SETYOURWATCHBY.NETLIFY.COM

Slide 70

Slide 70

SETYOURWATCHBY.NETLIFY.COM

Slide 71

Slide 71

SETYOURWATCHBY.NETLIFY.COM

Slide 72

Slide 72

SETYOURWATCHBY.NETLIFY.COM

Slide 73

Slide 73

WEBSTASK.IO

Slide 74

Slide 74

WEBSTASK.IO

Slide 75

Slide 75

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE make form submissions trigger a rebuild

Slide 76

Slide 76

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 77

Slide 77

netlify Fronteers Workshop January 2019 @philhawksworth I ABSOLUTELY POSITIVELY NEED A LITTLE LOGIC ON A SERVER

Slide 78

Slide 78

netlify Fronteers Workshop January 2019 @philhawksworth SERVERLESS TO THE RESCUE

Slide 79

Slide 79

netlify Fronteers Workshop January 2019 FUNCTIONS AS A SERVICE @philhawksworth NO AWS CONFIGURATION INSTANT PROVISIONING API GATWEAY & URLS IMMUTABLE VERSIONS SITE SYNCHRONICITY

Slide 80

Slide 80

netlify Fronteers Workshop January 2019 @philhawksworth NETLIFY LAMBDA 👉 findthat.at/lambda

Slide 81

Slide 81

netlify Fronteers Workshop January 2019 @philhawksworth FUNCTIONS PLAYGROUND 👉 findthat.at/playground

Slide 82

Slide 82

netlify Fronteers Workshop January 2019 @philhawksworth EXAMPLE add a delete button

Slide 83

Slide 83

netlify Fronteers Workshop January 2019 @philhawksworth EXERCISE add a delete button and trigger a redeploy

Slide 84

Slide 84

netlify Fronteers Workshop January 2019 @philhawksworth (FOLDER 5) ADD NETLIFY-LAMBDA AND REQUEST USE NETLIFY LAMBDA IN BUILD STEP HELLO WORLD EXPOSE THE SUBMISSION ID IN PROPOSAL DATA ADD DELETE BUTTON TO THE PROPOSAL LISTINGS

Slide 85

Slide 85

netlify Fronteers Workshop January 2019 @philhawksworth FUNCTIONS CAN BE TRIGGERED BY EVENTS 👉 findthat.at/eventdriven

Slide 86

Slide 86

netlify Fronteers Workshop January 2019 @philhawksworth CONCEPT

Slide 87

Slide 87

netlify Fronteers Workshop January 2019 @philhawksworth REDIRECTS API (AT THE EDGE) 👉 findthat.at/redirects

Slide 88

Slide 88

netlify Fronteers Workshop January 2019 @philhawksworth REDIRECTS ANY HTTP RESPONSE CODE PROXYING CUSTOM 404s COUNTRY LANGUAGE ROLE

Slide 89

Slide 89

THANKS QUESTIONS? @PHILHAWKSWORTH