DEV Community

Pere Sola
Pere Sola

Posted on

SEO with Gatsby

Well, Gatsby is great for SEO, or so I read. When I build a site with Gatsby I always forget what I did with the previous, so I end up searching around over and over again. Especially for my future self, here I list the steps to SEO perfection with a Gatsby site:

SEO Gatsby Guide

  1. Follow the SEO Gatsby guide. It guides you to create a SEO component adapted for search engine SEO and social SEO. It also talks about a canonical link.
  2. It use React Helmet plugin, you can find the docs here.
  3. You can find info and steps to create a SEO component here too. But less detailed than 1.

gatsby-config.js file

  1. A lot of the stuff above pulls data from gatsby-config.js. To know what to add there, read here.
  2. This article explains the metadata that can be added to the gatsby-config.js file. Why titleTemplate infers the title of the Gatsby site using %s, you can read it in Stackoverflow.
  3. At some point, the image property tells you Path to the image placed in the 'static' folder, in the project's root directory.. The answer can be found here.

Blog Posts

  1. They also have SEO labeled blog posts here.

Top comments (0)