From b527b459e28d1a759c0c45a76bbba3c5606d8dc3 Mon Sep 17 00:00:00 2001 From: Cristiano Rastelli Date: Tue, 31 Jan 2023 15:37:41 +0000 Subject: [PATCH] changed the image cards path to use components preview images --- website/app/services/head-data.js | 5 +++-- website/app/templates/head.hbs | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/website/app/services/head-data.js b/website/app/services/head-data.js index f450f047707..11acb5f98bb 100644 --- a/website/app/services/head-data.js +++ b/website/app/services/head-data.js @@ -18,8 +18,9 @@ export default class CustomHeadDataService extends HeadDataService { } get imgSrc() { - return this.currentRouteMeta?.frontmatter?.previewImage + const previewImage = this.currentRouteMeta?.frontmatter?.previewImage ? this.currentRouteMeta.frontmatter.previewImage - : config['ember-meta'].imgSrc; + : 'assets/logos/share-card.jpg'; + return `${config['ember-meta'].url}/${previewImage}`; } } diff --git a/website/app/templates/head.hbs b/website/app/templates/head.hbs index 9f006a11835..c883fad92bf 100644 --- a/website/app/templates/head.hbs +++ b/website/app/templates/head.hbs @@ -38,16 +38,22 @@ We've made some small customizations to simplify this compared to the default te {{/if}} - +{{#if this.model.imgSrc}} + +{{/if}} {{! END OPENGRAPH }} {{! BEGIN TWITTER }} + {{! template-lint-disable no-forbidden-elements no-potential-path-strings }} - + +{{#if this.model.imgSrc}} + +{{/if}} {{#if this.model.title}}