mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-24 20:42:23 +01:00
bugfix/#741 - fix socialImageUrl
This commit is contained in:
parent
c785820b0d
commit
f0c22e3583
@ -19,7 +19,7 @@ const Layout = ({
|
||||
socialImage
|
||||
}: Props) => {
|
||||
const { author, url } = useSiteMetadata();
|
||||
const metaImage = socialImage != null ? socialImage : author.photo;
|
||||
const metaImage = socialImage !== null ? socialImage : author.photo;
|
||||
const metaImageUrl = url + metaImage;
|
||||
|
||||
return (
|
||||
|
@ -19,7 +19,7 @@ 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'] : '';
|
||||
const socialImageUrl = socialImage ? socialImage['publicURL'] : null;
|
||||
|
||||
return (
|
||||
<Layout title={`${pageTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
|
@ -17,7 +17,7 @@ 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'] : '';
|
||||
const socialImageUrl = socialImage ? socialImage['publicURL'] : null;
|
||||
|
||||
return (
|
||||
<Layout title={`${postTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
|
Loading…
Reference in New Issue
Block a user