Skip to content

Commit 26a7cbb

Browse files
authored
frontmatter images can now be external
1 parent d19f8ee commit 26a7cbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/SEO.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const BlogSEO = ({
9494
const featuredImages = imagesArr.map((img) => {
9595
return {
9696
'@type': 'ImageObject',
97-
url: `${siteMetadata.siteUrl}${img}`,
97+
url: img.includes('http') ? img : siteMetadata.siteUrl + img,
9898
}
9999
})
100100

layouts/PostLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const discussUrl = (slug) =>
1717
const postDateTemplate = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }
1818

1919
export default function PostLayout({ frontMatter, authorDetails, next, prev, children }) {
20-
const { slug, fileName, date, title, tags } = frontMatter
20+
const { slug, fileName, date, title, images, tags } = frontMatter
2121

2222
return (
2323
<SectionContainer>

0 commit comments

Comments
 (0)