From 634568455640da5655284266e710527e97330405 Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Mon, 11 Nov 2019 16:40:53 +0700 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=90=9B=20Fixed=20twitter=20meta=20desc?= =?UTF-8?q?ription=20for=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://github.com/TryGhost/Ghost/issues/11317 refs https://github.com/TryGhost/Ghost/issues/10042 - Introduced with https://github.com/TryGhost/Ghost/pull/11080/commits/f69f04ae8d191538b25dd575acfa40d12d6756aa - Description and possible solution available in https://github.com/TryGhost/Ghost/issues/10042#issuecomment-551467666 --- core/frontend/meta/description.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/frontend/meta/description.js b/core/frontend/meta/description.js index 2f92bc34e6..bcc073d95e 100644 --- a/core/frontend/meta/description.js +++ b/core/frontend/meta/description.js @@ -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';