From 4f3733a7cff91c990afdc3c804fc16e941f0b032 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Mon, 13 Feb 2023 16:30:02 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Improved=20meta=20description=20?= =?UTF-8?q?preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ghost/admin/app/components/gh-post-settings-menu.hbs | 2 +- ghost/admin/app/components/gh-post-settings-menu.js | 2 +- ghost/admin/app/components/tags/tag-form.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost/admin/app/components/gh-post-settings-menu.hbs b/ghost/admin/app/components/gh-post-settings-menu.hbs index 8fe157af0f..93feed00f5 100644 --- a/ghost/admin/app/components/gh-post-settings-menu.hbs +++ b/ghost/admin/app/components/gh-post-settings-menu.hbs @@ -245,7 +245,7 @@
{{truncate this.seoTitle 60}}
-
{{moment-format (now) "DD MMM YYYY"}} — {{truncate this.seoDescription 149}}
+
{{moment-format (now) "DD MMM YYYY"}} — {{#if this.seoDescription}}{{truncate this.seoDescription 149}}{{else}}Search engines will automatically show a custom preview of content related to the search term here if no custom meta description is set.{{/if}}
diff --git a/ghost/admin/app/components/gh-post-settings-menu.js b/ghost/admin/app/components/gh-post-settings-menu.js index 617bc6abfc..526a05634c 100644 --- a/ghost/admin/app/components/gh-post-settings-menu.js +++ b/ghost/admin/app/components/gh-post-settings-menu.js @@ -62,7 +62,7 @@ export default class GhPostSettingsMenu extends Component { @boundOneWay('post.uuid') uuidValue; - @or('metaDescriptionScratch', 'customExcerptScratch', 'post.excerpt') + @or('metaDescriptionScratch', 'customExcerptScratch') seoDescription; @or( diff --git a/ghost/admin/app/components/tags/tag-form.hbs b/ghost/admin/app/components/tags/tag-form.hbs index aab9b1df11..326b8640fa 100644 --- a/ghost/admin/app/components/tags/tag-form.hbs +++ b/ghost/admin/app/components/tags/tag-form.hbs @@ -173,7 +173,7 @@
{{this.seoTitle}}
-
{{this.seoDescription}}
+
{{#if this.seoDescription}}{{truncate this.seoDescription 149}}{{else}}Search engines will automatically show a custom preview of content related to the search term here if no custom meta description is set.{{/if}}