mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 20:52:49 +02:00
bugfix/#741 - upgrade gatsby-remark-relative-images
This commit is contained in:
@@ -19,9 +19,10 @@ const PageTemplate = ({ data }: Props) => {
|
||||
const { frontmatter } = data.markdownRemark;
|
||||
const { title: pageTitle, description: pageDescription, socialImage } = frontmatter;
|
||||
const metaDescription = pageDescription !== null ? pageDescription : siteSubtitle;
|
||||
const socialImageUrl = socialImage ? socialImage['publicURL'] : '';
|
||||
|
||||
return (
|
||||
<Layout title={`${pageTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImage} >
|
||||
<Layout title={`${pageTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
<Sidebar />
|
||||
<Page title={pageTitle}>
|
||||
<div dangerouslySetInnerHTML={{ __html: pageBody }} />
|
||||
@@ -39,7 +40,9 @@ export const query = graphql`
|
||||
title
|
||||
date
|
||||
description
|
||||
socialImage
|
||||
socialImage {
|
||||
publicURL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,9 +17,10 @@ const PostTemplate = ({ data }: Props) => {
|
||||
const { frontmatter } = data.markdownRemark;
|
||||
const { title: postTitle, description: postDescription, socialImage } = frontmatter;
|
||||
const metaDescription = postDescription !== null ? postDescription : siteSubtitle;
|
||||
const socialImageUrl = socialImage ? socialImage['publicURL'] : '';
|
||||
|
||||
return (
|
||||
<Layout title={`${postTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImage} >
|
||||
<Layout title={`${postTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
<Post post={data.markdownRemark} />
|
||||
</Layout>
|
||||
);
|
||||
@@ -39,7 +40,9 @@ export const query = graphql`
|
||||
description
|
||||
tags
|
||||
title
|
||||
socialImage
|
||||
socialImage {
|
||||
publicURL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user