layout: true class: title name: title ??? --- layout: true class: section name: section ??? --- layout: true class: subsection name: subsection ??? --- layout: true class: image name: image ??? --- layout: true class: framework name: framework ??? --- layout: true class: why name: why ??? --- layout: true class: bg-cover background-image: url(images/time-traveling.gif) name: 88mph --- layout: true class: bg-cover, image name: full-screen --- layout: true class: level-3 name: level-3 --- layout: true class: level-2 name: level-2 --- layout: true class: level-2 name: inspiration --- layout: true class: level-2, soliloquy name: soliloquy --- layout: true class: level-2, facts name: facts --- layout: true class: level-2, definition name: definition --- template: title # The Static Web Revolution .col.col-4.about.left.centered[ ## Steven Hicks ###
[@pepopowitz](http://twitter.com/pepopowitz) ###
steven.j.hicks@gmail.com ###
[bit.ly/static-web-revolution](http://bit.ly/static-web-revolution) ] ??? thank you: * organizers * you! show of hands: * learned something new * left a talk inspired * met someone interesting * tired of sitting if so, stretch **Contact Info** --- layout: false class: bg-cover background-image: url(images/sponsors.jpg) ??? sponsors --- layout: true class: middle name: intro .col.col-5.profile.posterized[  ] --- .col.col-5[ # Steven Hicks ## JavaScript Engineer???? ] ??? I've been building websites for a while. --- template: title # A History Of The Web ??? So let's start with a brief history of the internet. And the best way to talk about history is to visit it. --- template: image class: delorean  ??? We'll climb into our time-traveling delorean --- template: full-screen background-image: url(images/time-circuits.jpg) ??? set our time circuits back about 20 years --- template: 88mph ??? When this baby hits 88 mph, I'm going to need your help. This doesn't work without sound. I need you all to make sound effects. --- template: title # The "Before" Time ??? we'll come out in the "Before" time. And we'll take a look around, in search of the internet. --- template: full-screen background-image: url(images/hot-topic.jpg) ??? We'll probably have to walk past hot topic to find it --- template: full-screen background-image: url(images/reel-big-fish.jpg) ??? and OH MY GOSH! look out for RBF! ... But here, I ...I think I see it. Here it is, the internet 20 years ago: --- class: no-footer template: image  ??? It was built on static HTML CSS A ton of blink and marquee tags And it was probably hosted on geocities. --- template: full-screen background-image: url(images/piles-of-files.jpg) ??? And it was hard to maintain all of those static files. Things got messy pretty quickly. So since we're developers, ... --- template: title # Dynamic back-ends ??? we built dynamic back-ends. We started with scripting languages --- template: framework   ??? like PHP and asp... And those were good --- template: framework    ??? Then we built fuller, better frameworks like asp.net.... And those were great they made developers lives easier ----eliminated a lot of copy and paste but it was still the dev’s job to manage the content --- template: framework    ??? so we built cms's.... with gui’s for content editing --- template: image  ??? so now our friends in marketing could manage the site and this was great, because it freed us up to do things we want to do --- template: image class: no-footer restart-animation: images/dinojump.gif name: dino-jump-2  ??? like turning on airplane mode and playing dino dash --- template: 88mph ??? we jump back in our time travelling delorean we'll need our sound effects again or else we'll be stuck in 1997 listening to "sell out" on repeat for the rest of our days and we'll come back to present day and we step out and look around, and... --- template: full-screen background-image: url(images/reel-big-fish.jpg) ??? UGH, COME ON you're still around????!!! just ignore them - they'll go away. --- template: image  ??? as we look around, we realize the internet now looks like this - it's bootstrap if you're fancy, you'll change a couple colors --- template: image  ??? and behind the scenes, a lot of them look like this the wordpress admin if you've ever self-hosted wordpress, --- template: image  ??? you know that some days feel like this --- template: title # How did we get here? ??? --- layout: true template: soliloquy class: fabio # The Allure Of The Dynamic CMS {{content}} .col.col-5.posterized.profile[  ] --- ??? Who can blame us? Fabio comes riding in on horseback Long hair flowing in the wind Nearly shirtless Representing the dynamic CMS And he tells us.... --- ## "I'm so easy to set up." ??? --- ## "I'm simple enough for anyone to use." ??? Anyone can use my admin --- ## "Any other way would be a maintenance nightmare." ??? And he harkens back to our good old days Of GeoCities and blink tags and scrolling marquees And he reminds how difficult it was to maintain static content back then --- ## "That's just how you do it." ??? And eventually we've heard his arguments so many times that we just go on autopilot. ... But today... --- layout: true template: soliloquy name: johnny-five # A Hero Rises .col.col-5.posterized.profile[  ] {{content}} --- ??? A hero rises. for the record - this hero is named supercat... And she has some questions for us. --- ## "Are we using the right tool?" ??? Supercat wants to know if we are using the right tool to build our sites. --- ## "Is your content truly dynamic?" ??? she wants to know if our content is as dynamic as we think it is. If every user sees the same thing, isn't that really static content? --- ## "How often does your content change?" ??? And if the content doesn't change that frequently, why do we need to drive it dynamically? --- ## "Is a dynamic site worth the cost of support?" ??? And one other question she asks is rarely thought about until you realize you've spent 4 mornings this month trying to get the site back up. --- layout: true template: facts # Surprising Numbers --- ??? And she shows us some surprising numbers. --- ## 32% ### of websites on the internet run on WordPress .footnote[ [http://stevenhicks.me/wordpress-runs-25-percent](http://stevenhicks.me/wordpress-runs-25-percent) ] ??? And when I started doing this talk a year and a half ago, it was 25% So it is growing --- ## 70% ### of WordPress installs are vulnerable .footnote[ [http://stevenhicks.me/wordpress-vulnerabilities](http://stevenhicks.me/wordpress-vulnerabilities) ] ??? XSS SQL injection CSRF --- ## 20% ### of the top 50 WordPress plugins are vulnerable .footnote[ [http://stevenhicks.me/wordpress-vulnerabilities](http://stevenhicks.me/wordpress-vulnerabilities) ] ??? one of the great things about wordpress is the plugin ecosystem there are a ton of them unfortunately, many of them are vulnerable to the same types of attacks the scariest part about vulnerable plugins is that you don’t know if the developer even knows it’s vulnerable, or when they’ll fix it, or if they even know how. --- template: johnny-five ## "There is a better way." ??? And our hero looks back at us And she says "there is a better way." --- template: title # Goals ??? I've said a lot of things about WordPress And I don't mean to dismiss the value of it It is a great platform that has worked for millions of people My goal today isn't to tell you what's wrong with WordPress. --- template: title # A compelling alternative ## To the traditional dynamic website ??? My goal today is to offer you a compelling alternative to the traditional dynamic website --- template: title # Dynamic Websites ??? So let's talk about dynamic websites. --- layout: true template: level-2 class: statement # Dynamic Websites --- ## Content is stored in a database --- ## HTML is generated when the user requests it ??? HTML is generated dynamically based on that content When the user requests it --- ## Content is often managed with a CMS --- class: image  ??? in a nutshell... --- class: image  --- class: image  ??? Contrast this with static websites. --- layout: true template: level-2 class: statement # Static Websites --- ## Content is stored as static files --- ## HTML is generated when content is changed --- ## Content can be managed with a static site generator --- class: image  ??? in a nutshell... --- class: image  --- class: image  ??? If you look back 20 years to the before time When we were on Geocities and a marquee tag was the best way to make a statement It's not much different than the static sites I'm describing here ** the difference is that the tooling is so much better ** --- template: title # Why Should You Go Static? ??? I have 5 reasons you should consider static sites And it is coincidence that they all begin with S --- layout: true template: level-2 class: bold-statement # Why --- class: bg-cover, inverse-text background-image: url(images/why/speed.jpg) ## Speed ??? Static html files **serve faster** They are **CDN ready** https://unsplash.com/search/cycling?photo=8tXukRrs7yk --- class: bg-cover, inverse-text background-image: url(images/why/security.jpg) ## Security ??? Dynamic back-ends are susceptible to many different types of attacks. Static sites **remove** so many **moving parts** And **eliminate** so many **attack vectors**. https://unsplash.com/search/security?photo=8yYAaguVDgY --- class: bg-cover, inverse-text background-image: url(images/why/simplicity.jpg) ## Simplicity ??? Fewer moving parts = fewer points of failure You don’t have to worry about your **database going down** You don’t have to worry about when to **clear the server cache** https://unsplash.com/search/swing?photo=gN8vJz4gPh8 --- class: bg-cover, inverse-text background-image: url(images/why/scalability.jpg) ## Scalability ??? As a result of the simplicity, your entire site is CDN ready. https://unsplash.com/search/people?photo=mVhd5QVlDWw ... Think about all the effort you’ve invested over the years in **optimizing database calls** and **caching strategies**, and trying to **move** as many things **to a CDN** as possible. ... When your entire site can live on a CDN.. that is a huge scalability win, and it **saves you a ton of time**. --- class: bg-cover, inverse-text background-image: url(images/why/source-control.jpg) ## Source Control ??? Your content is stored in your source control repository If you want to know what a page looked like on a certain date, or who changed it and when, you just browse the commit log. https://unsplash.com/search/photos/code?photo=xekxE_VR0Ec --- template: title # How Do I Get Started? --- template: definition # How ## Static Site Generator ### A command-line tool that takes simple, flat files as input and converts them to a complete website of static HTML files. ??? Choose a static generator But we need to talk about a few things first. ... So right off the bat Know that you're going to be using the command line. --- layout: true template: level-3 name: how # How --- ## How Do I Customize? -- ### CSS/LESS/SASS/PostCSS ??? Most have support for a css precompiler, if not multiple -- ### Themes (if you are lucky) --- class: image ## How Do I Write Content? ??? It depends on what you mean by content. --  --- class: image ## How Do I Write Content?  --- class: image ## How Do I Write Content?  --- ## How Do I Write Templates? -- ### With your favorite templating language ??? Maybe you don't have one! The truth is - it doesn't much matter. --- layout: true template: level-3 class: image-center # Templates --- ## EJS  ??? Because you're really just deciding what syntax you want to use to inject content --- ## Handlebars  --- ## Pug (Jade)  --- template: how ## How Do I Write Content? -- ### With a text editor -- ### In MarkDown --- class: double-image layout: false template: level-3 # Content ## Markdown .leftest[  ] -- .rightest[  ] ??? If you don't like markdown And I don't blame you With a lot of generators, you can use the same language you used for templates. --- class: statement template: how ## How Do I Add Metadata? ??? Things like "this is a draft" and "date published" -- ### Frontmatter --- layout: false template: level-3 # Metadata ## FrontMatter .col.col-5.centered.frontmatter[ #### about.md  ] --- template: title # Choosing A Generator --- template: title # [staticgen.com](https://www.staticgen.com) --- layout: true template: level-2 # Choosing A Generator --- class: image  ??? go to staticgen.com a directory of most open source static site generators --- class: image restart-animation: images/staticgendotcom.gif name: staticgendotcom  ??? scroll.... we're going to define some criteria. --- layout: true template: level-3 name: choosing-a-generator # Choosing A Generator --- ## Potential Criteria -- ### Engine Language -- ### Templating Language -- ### Simplicity vs Customization -- ### Extensibility -- ### Frontmatter Support --- template: title # Suggestions --- template: level-3 layout: true class: comparison name: suggestions # Suggestions --- template: suggestions ## Jekyll -- .pros[ * Support * Themes * Features ] -- .cons[ * Difficult setup * Not Windows-friendly ] --- class: image-center ## Jekyll .col.col-5.centered.profile.posterized[  ] ??? Jekyll is kind of like my dad. --- class: image-center ## Jekyll .col.col-5.centered.profile.posterized[  ] ??? He's a retired plumber. If you give him a problem, and he can rig together a solution. --- template: full-screen background-image: url(images/jekyll-mess.jpg) ??? Unlike my dad, though, sometimes when you're solving problems with Jekyll, it feels like you're just doing it this way because it works, not because it's the right way to do it. credit: https://unsplash.com/search/wiring?photo=qAShc5SV83M --- template: suggestions ## Hugo -- .pros[ * Fast * Support * Themes ] -- .cons[ * No extensibility ] --- class: image-center ## Hugo .col.col-5.centered.profile.posterized[  ] ??? Hugo is kind of like my coworker Brandon. He gets stuff done really fast, and with great quality, and makes you feel like a snail. If you have a lot of content to turn into HTML, Hugo is a great option. --- template: suggestions ## Eleventy -- .pros[ * Simple ] -- .cons[ * Not a lot of bells & whistles ] --- class: image-center ## Eleventy  ??? Eleventy is kind of like a banana slicer. it doesn't do much. people aren't going to talk about it a whole lot. but if you need to slice a banana..or in this case build a really simple static site.....this is how you do it. --- template: suggestions ## Gatsby -- .pros[ * React * PWA * Momentum ] -- .cons[ * React * You might not need all that stuff ] --- class: image-center ## Gatsby .col.col-5.centered.profile.posterized[  ] ??? Gatsby is kind of like my coworker Ryan. Ryan has all the coolest, latest gadgets. Gatsby is pretty cool technology. --- layout: true template: full-screen --- background-image: url(images/cheerios.jpg) ??? But sometimes...you have a bowl of honey nut cheerios... --- background-image: url(images/banana.jpg) ??? and a banana... --- background-image: url(images/cheerios-bananas.jpg) ??? and you want to end up here. --- layout: false class: image-center  ??? a banana slicer will get you there much more easily than a sapphire garmin watch. seems like a joke but i strongly believe in using the simplest tool that accomplishes what you're trying to do and that is often eleventy for me. --- template: how layout: true ## How Do I Host? --- class: bold-statement -- ### Anywhere. ??? It’s just static files So you can host it anywhere. If you're looking for some specific ideas.... --- -- ### Existing Infrastructure -- ### Amazon S3 -- ### Dropbox -- ### Github Pages -- ### Dedicated Static Hosts (surge, Aerobatic) --- class: bold-statement ### Netlify --- template: how ## Netlify Features -- ### Run builds for most static generators -- ### Free custom domains -- ### Free SSL -- ### Baked-in CDN -- ### Serverless Functions --- template: title # When Should You Go Static? --- layout: true template: level-2 name: when # When --- class: bold-statement ## Blogs --- layout: true template: level-3 # When ## Blogs --- class: image, hide-footer  ??? It might be a personal blog --- class: image, hide-footer  ??? It might be a company website and blog This is the actual Centare.com website, where I work It used to be a WordPress site We rewrote it using Harp We used to get errors from broken plugins about once a month Now it's never down. --- class: image, hide-footer  ??? It might even be something even bigger Like smashing magazine --- layout: true template: when --- class: bold-statement ## Portfolios --- template: level-3 class: image, hide-footer # When ## Portfolios  --- class: bold-statement ## Brochures --- template: level-3 class: image, hide-footer # When ## Brochures  --- class: bold-statement ## Docs --- template: level-3 class: image, hide-footer # When ## Docs  ??? --- class: bold-statement ## Style Guides --- template: level-3 class: image, hide-footer # When ## Style Guides  --- class: bold-statement ## Events --- template: level-3 class: image, hide-footer # When ## Events  ??? This also used to be a Wordpress site Now we're using gatsby Updates are really easy to push And again, we never worry about trying to get the WordPress instance back up after a bad update. --- layout: false class: image  ??? so that's a lot of some simple sites we can build statically. but is that really as far as we can go? Can we augment these static sites with more interactivity? --- template: title class: jam-stack # The JAM Stack ## **J**avaScript ## **A**PIs ## **M**arkup  ??? We can! And there are some who don't like calling these sites "static" They'd prefer to call them "the JAM stack". --- template: title layout: true name: jam # The JAM Stack --- class: jam-stack ## "M" Is For Markup  ??? And the M is what we've talked about. Using static site generators to generate HTML easily. --- class: jam-stack ## "A" Is For APIs ## "J" Is For JavaScript  ??? And the J and the A go hand in hand These are the things we can add to a static site to augment it with interactivity. And these things span a broad spectrum. --- layout: true template: level-3 class: image-center # "A"/"J" Is For APIs/JavaScript --- layout: true template: level-2 # "A"/"J" Is For APIs/JavaScript --- level: 1 class: h2-list ## Social Plugins ??? Twitter, Facebook, Spotify, SoundCloud -- level: 1 ## Comments ??? Disqus, Discourse -- ## Forms ??? Google Forms, Typeform -- ## Commerce ??? e-Commerce is a bit more complicated, but not much. SnipCart is a great drop-in option - relies on data- attributes to connect -- ## Site Search ??? Google Site Search, Lunr.js, Algolia - service that crawls -- ## User Data ??? Firebase -- ## Serverless ??? Firebase; Serverless.com; --- template: title # [theNewDynamic.org/tools](https://www.thenewdynamic.org/tools/) ??? For all of these and more You can go to.... --- template: title class: jam-stack # The JAM Stack ## **J**avaScript ## **A**PIs ## **M**arkup  ??? And so with our JAM stack We've improved the lives of developers. --- template: full-screen background-image: url(images/why/security.jpg) ??? Our site is much more secure, and less work to maintain. credit - https://unsplash.com/search/security?photo=8yYAaguVDgY --- template: full-screen background-image: url(images/why/speed.jpg) ??? We've improved the lives of our users, Because our site flies like the wind. --- template: image restart-animation: images/dinojump.gif name: dino-jump class: hide-footer  ??? But we still can't focus on the things we want to focus on Because we forgot about someone. --- template: image .col.col-5.centered.profile.posterized[  ] ??? The content authors. This is my wife Stephanie. Steph is an English teacher & yoga instructor. She wants to post to her blog every once in a while. But she's focused on lots of other things. --- template: image  ??? She doesn't have the time or interest to learn MarkDown. She's not interested in using a text editor to post something to her site. For Steph we need a more visual tool. ... This is why we need to talk about --- template: title # Authoring Tools --- template: level-3 layout: true # Authoring Tools --- class: image, hide-footer ## Text Editor  ??? For devs, we have our favorite text editor. And we can learn to write in MD. You also might have a tech-savvy author. --- template: level-2 class: image # Authoring Tools .col.col-5.centered.profile.posterized[  ] ??? For Steph, and the less-savvy author, we need something more visual. --- template: level-2 class: bold-statement # Authoring Tools ## Headless CMS ??? we need... and a headless cms is basically... --- template: level-3 class: bold-statement # Authoring Tools ## Headless CMS ### CMS As A Service --- class: image ## Without a Headless CMS  ??? without a headless cms, (describe slide) --- class: image ## With a Headless CMS  ??? a headless cms typically swaps out that git repository for content as a service. the content is stored in their db instead of in your repo. your static site generator will hit an api and consume the content from the headless cms at build time **note**: you're introducing more attack vectors. --- layout: true template: level-3 # Headless CMS --- class: image, hide-footer ## Contentful  ??? Contentful CMS as a service is young Many of these have launched pretty recently There are a lot of features yet to come in this space --- class: image ## Netlify CMS  ??? but there's one headless CMS that stands out to me. Netlify CMS - built by the people at Netlify. --- class: image ## Netlify CMS  ??? It's a little bit different, in that it integrates with Git so that the content is still stored in your repo When you make changes, it pushes to your repository If you're site is hosted on Netlify, Netlify will see those changes, and regenerate your static site. --- class: image, hide-footer ## Netlify CMS  ??? and if you're wondering about the viability of this this is what Smashing magazine uses. --- template: title # [headlessCMS.org](https://www.headlessCMS.org/) ??? Maybe Netlify CMS isn't right for you. If you want to find the right headless CMS, there's a directory for them. --- template: title # The Static Web Revolution --- template: level-2 class: bg-cover background-image: url(images/metamorphosis.jpg) ??? A revolution is an **inflection point** A **metamorphosis** A significant change is made in how we do something. The **old way** becomes the **new way** --- template: level-2 class: bg-cover background-image: url(images/heavy-cms.jpg) # The Old Way ??? The **old way** of website development looks like this **container ship**. We used **bulky CMS's** that accomplished **many different things**... But they were **hard to navigate**. --- template: level-2 class: bg-cover, inverse-text background-image: url(images/micro-cms.jpg) # The New Way ??? The **new way** looks like this. Instead of putting everything into one giant CMS We have **lots of specialized boats**, that each do the things they're good at. A boat for **authentication** **content mgmt** **serving content** --- template: level-2 class: image # The New Way  ??? This is the future of building websites that I'm excited about. The Scalability, Speed, and Security of static websites Augmented with JavaScript and APIs And managed with a headless CMS is where I see the future of building websites. --- template: title # Thank You! .col.col-4.about.left.centered[ ## Steven Hicks ###
[@pepopowitz](http://twitter.com/pepopowitz) ###
steven.j.hicks@gmail.com ###
[bit.ly/static-web-revolution](http://bit.ly/static-web-revolution) ] ??? I'd like to thank you for your time. I really appreciate it. I hope you have a great time at That Conference. --- template: level-2 class: double-wide, hide-footer # Resources .leftest[ ### Tools * Geocitiesizer - http://www.wonder-tonic.com/geocitiesizer/ * Jekyll - http://jekyllrb.com * Hugo - http://gohugo.io * Eleventy - http://11ty.io * Gatsby - https://github.com/gatsbyjs/gatsby ### Directories * http://www.staticgen.com * http://www.thenewdynamic.org/tools ### Images * Files - https://www.flickr.com/photos/stevenbley/4174688409 * Speed - https://unsplash.com/photos/8tXukRrs7yk ] .rightest[ ### Images * Security - https://unsplash.com/photos/8yYAaguVDgY * Simplicity - https://unsplash.com/photos/gN8vJz4gPh8 * Scalability - https://unsplash.com/photos/mVhd5QVlDWw * Source Control - https://unsplash.com/photos/xekxE_VR0Ec * Wiring - https://unsplash.com/photos/qAShc5SV83M * Lock - https://unsplash.com/photos/8yYAaguVDgY * Metamorphosis - https://static.pexels.com/photos/39862/cocoon-butterfly-insect-animal-39862.jpeg * Container Ship - https://static.pexels.com/photos/104346/pexels-photo-104346.jpeg * Boats - https://unsplash.com/photos/PR_LKkOiaUQ ]