📎 Webclip
A Few Things I Do Every Time I Start A New Gatsby Site
The author keeps a checklist for new Gatsby sites. He updates starter dependencies right away, switches package scripts to Yarn, adds a lang attribute to the html element, and installs plugins for Content Security Policy and offline caching.
Reading notes#
- He upgrades all dependencies to the latest versions before working with a starter, using yarn upgrade-interactive –latest.
- He prefers Yarn over npm, replaces “npm run” with “yarn” in package.json, and deletes package.lock.
- He checks starters with the aXe accessibility extension and often finds that the html element is missing a lang attribute.
- He says this can be fixed with Helmet by passing htmlAttributes={{ lang: ’en’ }}.
- He adds Gatsby plugins for Content Security Policy and offline caching.
- He links to an article about PWAs and Gatsby and asks readers what else they do when starting a Gatsby site.
