Add fallback option for ogImage and include author profile picture
This commit is contained in:
parent
7f5508d529
commit
d8c0ad0bae
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@matthiesenxyz/astro-hashnode": patch
|
||||
---
|
||||
|
||||
[fix] add extra fallback option for ogImage
|
|
@ -129,6 +129,9 @@ export const getPublication = async () => {
|
|||
displayTitle
|
||||
descriptionSEO
|
||||
favicon
|
||||
author {
|
||||
profilePicture
|
||||
}
|
||||
preferences {
|
||||
logo
|
||||
disableFooterBranding
|
||||
|
|
|
@ -60,6 +60,9 @@ export const PublicationDataSchema = z.object({
|
|||
displayTitle: z.string(),
|
||||
descriptionSEO: z.string(),
|
||||
favicon: z.string(),
|
||||
author: z.object({
|
||||
profilePicture: z.string(),
|
||||
}),
|
||||
preferences: z.object({
|
||||
logo: z.string(),
|
||||
disableFooterBranding: z.boolean(),
|
||||
|
|
|
@ -41,7 +41,7 @@ const { pageTitle, hideFooter, hideHeader, ogImage } = Astro.props as AstroHashn
|
|||
basic: {
|
||||
title: pageTitle ? pageTitle + " | " + pubHeader : pubHeader,
|
||||
type: 'text',
|
||||
image: ogImage || pubData.favicon,
|
||||
image: ogImage || pubData.favicon || pubData.author.profilePicture,
|
||||
},
|
||||
optional: {
|
||||
description: pubData.descriptionSEO,
|
||||
|
|
Loading…
Reference in New Issue