I am fairly new to React, GraphQL and Gatsby. I am following along with the tutorial and cannot quite figure out where the <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
tag is supposed to go...
Here is my layout.js file...
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import {StaticQuery, graphql} from 'gatsby'
import Header from './header'
import './css/style.css'
import Footer from './footer'
const Layout = ({ children }) => (
<StaticQuery
query={graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
description
keywords
}
}
allContentfulLink (sort: { fields: [createdAt], order: ASC }) {
edges {
node {
title
url
createdAt
}
}
}
}
`}
render={data => (
<>
<Helmet
title={data.site.siteMetadata.title}
meta={[
{ name: 'description', content: data.site.siteMetadata.description },
{ name: 'keywords', content: data.site.siteMetadata.keywords },
]}
>
<html lang="en" />
</Helmet>
<Header siteTitle={data.site.siteMetadata.title}/>
{children}
<Footer data={data}>
</Footer>
</>
)}
/>
)
Layout.propTypes = {
children: PropTypes.node.isRequired,
}
export default Layout
I have attempted to add the in the helmet, opening the tag and inserting inside of there and both receive errors.
I am not sure what I am doing wrong.
Any assistance is greatly appreciated!!