fix: 🐛 need new fallback for ogImage (#25)
Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <amatthiesen@outlook.com>
This commit is contained in:
parent
b375a29495
commit
6464de28f8
|
@ -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