mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 04:32:32 +02:00
Update page template, post-template
This commit is contained in:
@@ -17,9 +17,9 @@ const PageTemplate = ({ data }: Props) => {
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { html: pageBody } = data.markdownRemark;
|
||||
const { frontmatter } = data.markdownRemark;
|
||||
const { title: pageTitle, description: pageDescription, socialImage } = frontmatter;
|
||||
const metaDescription = pageDescription !== null ? pageDescription : siteSubtitle;
|
||||
const socialImageUrl = typeof socialImage !== 'undefined' ? socialImage['publicURL'] : undefined;
|
||||
const { title: pageTitle, description: pageDescription = '', socialImage } = frontmatter;
|
||||
const metaDescription = pageDescription || siteSubtitle;
|
||||
const socialImageUrl = socialImage?.publicURL;
|
||||
|
||||
return (
|
||||
<Layout title={`${pageTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
|
@@ -15,9 +15,9 @@ type Props = {
|
||||
const PostTemplate = ({ data }: Props) => {
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { frontmatter } = data.markdownRemark;
|
||||
const { title: postTitle, description: postDescription, socialImage } = frontmatter;
|
||||
const metaDescription = postDescription !== null ? postDescription : siteSubtitle;
|
||||
const socialImageUrl = typeof socialImage !== 'undefined' ? socialImage['publicURL'] : undefined;
|
||||
const { title: postTitle, description: postDescription = '', socialImage } = frontmatter;
|
||||
const metaDescription = postDescription || siteSubtitle;
|
||||
const socialImageUrl = socialImage?.publicURL;
|
||||
|
||||
return (
|
||||
<Layout title={`${postTitle} - ${siteTitle}`} description={metaDescription} socialImage={socialImageUrl} >
|
||||
|
Reference in New Issue
Block a user