This commit is contained in:
@@ -14,17 +14,9 @@ const BlogPostTemplate: React.FC<
|
||||
PageProps<{ post: PostNode }, PageContext>
|
||||
> = ({ data, location, pageContext }) => {
|
||||
const { post } = data
|
||||
const { previewImg } = post.frontmatter
|
||||
|
||||
return (
|
||||
<Layout location={location} heroSection={false}>
|
||||
<Seo
|
||||
title={post.frontmatter.title}
|
||||
description={post.frontmatter.description}
|
||||
previewImg={
|
||||
previewImg?.childImageSharp?.gatsbyImageData?.images?.fallback?.src
|
||||
}
|
||||
/>
|
||||
<Section color="black" bgColor="white" bottomArrow={false}>
|
||||
<div className="row">
|
||||
<div className="col-md-7">
|
||||
@@ -41,6 +33,21 @@ const BlogPostTemplate: React.FC<
|
||||
|
||||
export default BlogPostTemplate
|
||||
|
||||
export const Head: React.FC<{ data: { post: PostNode } }> = ({ data }) => {
|
||||
const { post } = data
|
||||
const { previewImg } = post.frontmatter
|
||||
|
||||
return (
|
||||
<Seo
|
||||
title={post.frontmatter.title}
|
||||
description={post.frontmatter.description}
|
||||
previewImg={
|
||||
previewImg?.childImageSharp?.gatsbyImageData?.images?.fallback?.src
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export const pageQuery = graphql`
|
||||
query PostByPath($id: String!) {
|
||||
post: markdownRemark(id: { eq: $id }) {
|
||||
|
||||
Reference in New Issue
Block a user