SEO

A dynamic solution

Our SEO component can be found in _app.js, and consumes two props:

  1. seo - deconstructed from data.

  2. siteMeta - deconstructed from global.

Popping over to the actual SEO.js file, you can see that these props are piped into a useSEO custom hook. This is where values like title, image and url are updated to accurately reflect the current page.

Finally, the SEO component assigns these values to the proper tags (meta, link, etc.), and injects them inside of a next/head.

It is rare that you will need to edit this file, outside of adding the occasional custom <scripts />.

💡
See something that is out of date or that could be improved?Please let the team know!1. You can create a Github issue2. Pull down the repo and create a PR with your suggested changes implimented.3. Or just let someone know in the R&P Slack Channel.We love making things better.