upstream #1
@ -97,7 +97,7 @@ tags (required, can be empty array)
|
|||||||
lastmod (optional)
|
lastmod (optional)
|
||||||
draft (optional)
|
draft (optional)
|
||||||
summary (optional)
|
summary (optional)
|
||||||
images (optional, adds to socialBanner in siteMetadata config)
|
images (optional, if none provided defaults to socialBanner in siteMetadata config)
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example of a post's frontmatter:
|
Here's an example of a post's frontmatter:
|
||||||
|
@ -51,9 +51,11 @@ export const BlogSeo = ({ title, summary, date, lastmod, url, tags, images = []
|
|||||||
const publishedAt = new Date(date).toISOString()
|
const publishedAt = new Date(date).toISOString()
|
||||||
const modifiedAt = new Date(lastmod || date).toISOString()
|
const modifiedAt = new Date(lastmod || date).toISOString()
|
||||||
let imagesArr =
|
let imagesArr =
|
||||||
typeof images === 'string'
|
images.length === 0
|
||||||
? [images, siteMetadata.socialBanner]
|
? [siteMetadata.socialBanner]
|
||||||
: [...images, siteMetadata.socialBanner]
|
: typeof images === 'string'
|
||||||
|
? images
|
||||||
|
: [images]
|
||||||
|
|
||||||
const featuredImages = imagesArr.map((img) => {
|
const featuredImages = imagesArr.map((img) => {
|
||||||
return {
|
return {
|
||||||
|
@ -105,7 +105,7 @@ tags (required, can be empty array)
|
|||||||
lastmod (optional)
|
lastmod (optional)
|
||||||
draft (optional)
|
draft (optional)
|
||||||
summary (optional)
|
summary (optional)
|
||||||
images (optional, adds to socialBanner in siteMetadata config)
|
images (optional, if none provided defaults to socialBanner in siteMetadata config)
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example of a post's frontmatter:
|
Here's an example of a post's frontmatter:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user