Last active
August 27, 2020 20:24
-
-
Save adamjarling/1217207158f504b3cdcfc7d29576e546 to your computer and use it in GitHub Desktop.
Example configuration for including
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Very simplified version of a component | |
import React from "react" | |
import { Helmet } from "react-helmet" | |
import { useStaticQuery, graphql } from "gatsby" | |
import ogImage from "../images/og-image.png" | |
export default function SEO() { | |
return ( | |
<Helmet | |
title="I am a page title" | |
meta={[ | |
{ | |
property: `og:title`, | |
content: "I am a title Open Graph protocol will pick up and display", | |
}, | |
{ | |
property: `og:type`, | |
content: `website`, | |
}, | |
{ | |
property: `og:image`, | |
// You should ideally replace the hardcoded URL below with a value you set | |
// in your gatsby-config.js file. And import all shared site metadata into | |
// this component with the useStaticQuery hook. | |
content: `https://www.furbaby.rocks/${ogImage}`, | |
}, | |
]} | |
/> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment