Created
October 8, 2022 23:45
-
-
Save benjifriedman/2885e110cb618d335d5f2b3847922310 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//index.js | |
import React from "react" | |
import { Link } from "gatsby" | |
import Layout from "../components/layout" | |
import Seo from "../components/seo.js" | |
const IndexPage = () => { | |
return ( | |
<Layout> | |
<Seo title="Home" /> | |
//homepage content | |
</Layout> | |
) | |
} | |
export default IndexPage | |
//seo.js | |
import React from "react" | |
import { Helmet } from "react-helmet" | |
import { useStaticQuery, graphql } from "gatsby" | |
const Seo = ({ title }) => { | |
const data = useStaticQuery(graphql` | |
query { | |
site { | |
siteMetadata { | |
title | |
} | |
} | |
} | |
`) | |
return <Helmet title={`${title} | ${data.site.siteMetadata.title}`} /> | |
} | |
export default Seo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just reviewing this again... so every page needs to have an
export const Head
now?