mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
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:
parent
27dadcf1c4
commit
59948a7b7e
@ -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'),
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user