From 45795ac81abf1fe0fb94b8b4fe9fb9d367a0c10c Mon Sep 17 00:00:00 2001 From: ekachxaidze98 Date: Wed, 22 Jan 2025 13:39:00 +0400 Subject: [PATCH] CORE-5082: img path for discovery --- netlify-cms.config.yml | 4 +- pages/services/discovery.jsx | 4 +- public/images/services/coverage.svg | 5 - public/images/services/discoveryImage.svg | 174 ---------------------- public/images/services/discoveryLock.svg | 6 - public/images/services/doi.svg | 5 - public/images/services/grip.svg | 5 - public/images/services/laptop.svg | 5 - 8 files changed, 5 insertions(+), 203 deletions(-) delete mode 100644 public/images/services/coverage.svg delete mode 100644 public/images/services/discoveryImage.svg delete mode 100644 public/images/services/discoveryLock.svg delete mode 100644 public/images/services/doi.svg delete mode 100644 public/images/services/grip.svg delete mode 100644 public/images/services/laptop.svg diff --git a/netlify-cms.config.yml b/netlify-cms.config.yml index 1a1e46a2..b0bb7ae1 100644 --- a/netlify-cms.config.yml +++ b/netlify-cms.config.yml @@ -3349,8 +3349,8 @@ collections: - name: discovery - media_folder: '/images' - public_folder: '/images' + media_folder: '/images/services' + public_folder: '/images/services' create: false delete: false diff --git a/pages/services/discovery.jsx b/pages/services/discovery.jsx index 6875c57a..5af09c60 100644 --- a/pages/services/discovery.jsx +++ b/pages/services/discovery.jsx @@ -6,11 +6,13 @@ import retrieveContent from 'content' const ASSETS_BASE_URL = 'https://oacore.github.io/content/' -const setAssetsUrl = (object) => +const setAssetsUrl = (object) => { Object.entries(object).forEach(([key, value]) => { if (typeof value === 'string' && value.includes('/images')) object[key] = ASSETS_BASE_URL + value + else if (typeof value === 'object') setAssetsUrl(value) // Recursively process nested objects }) +} const getSections = async ({ ref } = {}) => { const page = await retrieveContent('discovery', { diff --git a/public/images/services/coverage.svg b/public/images/services/coverage.svg deleted file mode 100644 index a3ebd9d6..00000000 --- a/public/images/services/coverage.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/images/services/discoveryImage.svg b/public/images/services/discoveryImage.svg deleted file mode 100644 index 573c878e..00000000 --- a/public/images/services/discoveryImage.svg +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/images/services/discoveryLock.svg b/public/images/services/discoveryLock.svg deleted file mode 100644 index b9dcd9e8..00000000 --- a/public/images/services/discoveryLock.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/public/images/services/doi.svg b/public/images/services/doi.svg deleted file mode 100644 index b0184662..00000000 --- a/public/images/services/doi.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/images/services/grip.svg b/public/images/services/grip.svg deleted file mode 100644 index e6afa7e1..00000000 --- a/public/images/services/grip.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/images/services/laptop.svg b/public/images/services/laptop.svg deleted file mode 100644 index 40a870e5..00000000 --- a/public/images/services/laptop.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - -