DEV Community

Pere Sola
Pere Sola

Posted on

3

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay