0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

🐛 Fixed twitter meta description for pages

closes https://github.com/TryGhost/Ghost/issues/11317
refs https://github.com/TryGhost/Ghost/issues/10042

- Introduced with f69f04ae8d
- Description and possible solution available in https://github.com/TryGhost/Ghost/issues/10042#issuecomment-551467666
This commit is contained in:
Nazar Gargol 2019-11-11 16:40:53 +07:00
parent d8ca54fd71
commit 6345684556

View file

@ -36,6 +36,14 @@ function getDescription(data, root, options) {
} else {
description = data.post.meta_description || '';
}
} else if (_.includes(context, 'page') && data.post) {
// @NOTE:
if (options && options.property) {
postSdDescription = options.property + '_description';
description = data.post[postSdDescription] || '';
} else {
description = data.post.meta_description || '';
}
} else if (_.includes(context, 'page') && data.page) {
if (options && options.property) {
postSdDescription = options.property + '_description';