A dynamic solution
Our SEO
component can be found in _app.js
, and consumes two props:
seo
- deconstructed from data
.
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 />
.