Added site twitter/facebook and cover image fallbacks to social previews

refs f3e0949c73

- Ghost has been updated to use the additional fallbacks, we should reflect this in the Admin social previews too
This commit is contained in:
Kevin Ansfield 2021-02-05 09:24:26 +00:00
parent 27dadcf1c4
commit 59948a7b7e
2 changed files with 4 additions and 4 deletions

View File

@ -41,10 +41,10 @@ export default Component.extend(SettingsMenuMixin, {
slugValue: boundOneWay('post.slug'),
facebookDescription: or('ogDescriptionScratch', 'customExcerptScratch', 'seoDescription', 'post.excerpt', 'settings.description', ''),
facebookImage: or('post.ogImage', 'post.featureImage'),
facebookImage: or('post.ogImage', 'post.featureImage', 'settings.ogImage', 'settings.coverImage'),
facebookTitle: or('ogTitleScratch', 'seoTitle'),
twitterDescription: or('twitterDescriptionScratch', 'customExcerptScratch', 'seoDescription', 'post.excerpt', 'settings.description', ''),
twitterImage: or('post.twitterImage', 'post.featureImage'),
twitterImage: or('post.twitterImage', 'post.featureImage', 'settings.twitterImage', 'settings.coverImage'),
twitterTitle: or('twitterTitleScratch', 'seoTitle'),
showVisibilityInput: or('session.user.isOwner', 'session.user.isAdmin', 'session.user.isEditor'),

View File

@ -55,7 +55,7 @@ export default class ModalPostPreviewSocialComponent extends Component {
}
get facebookImage() {
return this.args.post.ogImage || this.args.post.featureImage;
return this.args.post.ogImage || this.args.post.featureImage || this.settings.get('ogImage') || this.settings.get('coverImage');
}
// Twitter
@ -69,6 +69,6 @@ export default class ModalPostPreviewSocialComponent extends Component {
}
get twitterImage() {
return this.args.post.twitterImage || this.args.post.featureImage;
return this.args.post.twitterImage || this.args.post.featureImage || this.settings.get('twitterImage') || this.settings.get('coverImage');
}
}