Adding Page Metadata
If you’ve run an audit with Lighthouse, you may have noticed a lackluster score in the “SEO” category. Let’s address how you can improve that score.
Adding metadata to pages (such as a title or description) is key in helping search engines like Google understand your content, and decide when to surface it in search results.
Gatsby’s react helmet plugin provides drop-in support for server rendering data added with React Helmet. Using the plugin, attributes you add to React Helmet will be added to the static HTML pages that Gatsby builds.
- Install both packages:
- Add the plugin to the
pluginsarray in your
React Helmetin your pages:
💡 The above example is from the React Helmet docs. Check those out for more!
You may also be interested in checking out the doc on adding an SEO component.