From 8e1ea434b3b6152ba9213c32c528ead596bab29e Mon Sep 17 00:00:00 2001 From: dev-rajneeshkumar Date: Mon, 20 Jan 2025 12:00:01 +0530 Subject: [PATCH 1/2] geo coveo search issue --- blocks/resources/resources.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/resources/resources.js b/blocks/resources/resources.js index 1f2fcc7e3..fd6d6e5b0 100644 --- a/blocks/resources/resources.js +++ b/blocks/resources/resources.js @@ -405,7 +405,7 @@ export async function coveoResources(target) { const subCategory = encodeURIComponent(getMetadata('sub-category').trim()); let searchTitle = encodeURIComponent(getMetadata('search-title').trim()); if (!searchTitle) { - searchTitle = document.querySelector('main h1').textContent; + searchTitle = encodeURIComponent(getMetadata('title').trim()); } let params; if (!subCategory) { From 54fa8f15584915d97f21f8a5d0301645800212f2 Mon Sep 17 00:00:00 2001 From: bluedeepart Date: Mon, 20 Jan 2025 12:10:18 +0530 Subject: [PATCH 2/2] updated search title value --- blocks/resources/resources.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/resources/resources.js b/blocks/resources/resources.js index fd6d6e5b0..0c0794beb 100644 --- a/blocks/resources/resources.js +++ b/blocks/resources/resources.js @@ -405,7 +405,7 @@ export async function coveoResources(target) { const subCategory = encodeURIComponent(getMetadata('sub-category').trim()); let searchTitle = encodeURIComponent(getMetadata('search-title').trim()); if (!searchTitle) { - searchTitle = encodeURIComponent(getMetadata('title').trim()); + searchTitle = encodeURIComponent(getMetadata('og:title').trim()); } let params; if (!subCategory) {