JAM Stack is so hot right now. Like many others, I’m exploring frameworks like Gatsby, Next.js, and Nuxt.js, but not on this blog. My goal for this blog is to get JAM stack performance without the JAM stack.
Instead of Gatsby or Next.js, I’m using a Ruby static site generator (Jekyll) with HTML, CSS, and minimal JavaScript for progressive enhancement. My litmus test for this blog is that you can still comfortably read it if you disable JavaScript1. With JavaScript enabled, this blog should feel very close to a single page app.
Here’s the stack:
-
Jekyll
- Generates static pages
-
Webpack w/ PurgeCSS
- Bundles both CSS and JavaScript
-
Turbolinks
- I’ve also added a script to prefetch pages for Turbolinks when you hover on the links for longer than 400ms (greatly improves Turbolinks experience).
- This script is similar to instant.page and InstantClick.
- To see it in action, try hovering over this link right before clicking it, and see how fast it loads:
- I’ve also added a script to prefetch pages for Turbolinks when you hover on the links for longer than 400ms (greatly improves Turbolinks experience).
-
Font Awesome
- I’m considering ditching this because it’s a lot of overhead just for the handful of icons I use.
- Currently using the SVG kit, which remotely loads the individual icons (so not bad performance)
- This is still dependent on JavaScript which I’m OK with, except there is a flicker on initial page load.
- Ideally I would like to include a subset of icons via CSS or direct SVGs.
-
Netlify
- Web host
- OpenGraph image generation API deployed as Netlify function
- source code
- egghead course
- I’m planning to check out this approach by Jason Lengstorf
- It also uses Cloudinary but with fewer dependencies afaict
-
Idea: add an option to disable all JavaScript. ↩