Hi all. I threw out this Tweet into the Twitterverse, but thought it would be wise to ask for help here as well.
Nick Taylor@nickytonlineHi @gatsbyjs/@Netlify peeps. I've run the @____lighthouse audit,and the score is 🔥, but I'm wondering about assets being served over HTTP/1.1.I know Netlify OOTB serves HTTP 2,so do I need to generate and inject entries into netlify.toml for my my build or is there a better way?03:09 AM - 29 Jan 2019
I have a Gatsby site deployed to Netlify, and some of my assets are being served over HTTP/1.1. I know that Netlify supports HTTP/2 by default for sites enabled with HTTP2.
I know that I need to add entries into my
_headers file, e.g.
/ Link: </js/example-script.js>; rel=preload; as=script Link: </css/example-style.css>; rel=preload; as=style
but it would be a pain to update this after every deploy. Is anyone aware of a gatsby plugin that might do this, or how do you go about handling this with your Gatsby site when hosted on Netlify?
I can probably generate the
_headers file as part of my build process, but my gut tells me someone has already done this 😉
The source code is here if anyone is interested.
Hey there, I'm Nick and this is my site's source code. This site started off as a clone of the Netlify CMS Gatsby Starter (check it out!). Since then, I've tweaked it a lot and converted the codebase to TypeScript.
Feel free to peruse the code and/or fork it.
Thanks to all the wonderful projects that made it possible to build this blog.
To get up and running:
- clone the repository by running
git clone firstname.lastname@example.org:nickytonline/www.iamdeveloper.com.gitor
git clone https://github.com/nickytonline/www.iamdeveloper.com.git
npm run developto get up and running with the Gatsby development server.
- Since the project uses Babel and not TypeScript as the compiler, a separate process is required to run type checking. Open another terminal and run
npm run type-check:watch
- If you're curious about why the Netlify CMS admin…