chore: use cms w/ open authoring for site edits (#3287)

This commit is contained in:
Shawn Erquhart
2020-02-19 16:55:10 -05:00
committed by GitHub
parent bcdd68045d
commit 783440e370
13 changed files with 411 additions and 305 deletions

View File

@ -28,6 +28,13 @@ const LAYOUT_QUERY = graphql`
}
`;
export const LayoutTemplate = ({ children }) => (
<ThemeProvider theme={theme}>
<GlobalStyles />
{children}
</ThemeProvider>
)
const Layout = ({ hasPageHero, children }) => {
return (
<StaticQuery query={LAYOUT_QUERY}>
@ -35,8 +42,12 @@ const Layout = ({ hasPageHero, children }) => {
const { title, description } = data.site.siteMetadata;
return (
<ThemeProvider theme={theme}>
<GlobalStyles />
<LayoutTemplate
title={title}
description={description}
hasPageHero={hasPageHero}
footerButtons={data.footer.childDataYaml.footer.buttons}
>
<Helmet defaultTitle={title} titleTemplate={`%s | ${title}`}>
<meta name="description" content={description} />
<link
@ -47,7 +58,7 @@ const Layout = ({ hasPageHero, children }) => {
<Header hasHeroBelow={hasPageHero} />
{children}
<Footer buttons={data.footer.childDataYaml.footer.buttons} />
</ThemeProvider>
</LayoutTemplate>
);
}}
</StaticQuery>