From 0618165e99115e39f1202b165b6330b87d712ec5 Mon Sep 17 00:00:00 2001 From: ukwilko Date: Thu, 30 Aug 2018 21:53:22 +0100 Subject: [PATCH 1/2] Update asset.js entry[fieldname].path is returning the full path, removed the folder name from the config path --- gatsby-plugin-cockpit/helpers/asset.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gatsby-plugin-cockpit/helpers/asset.js b/gatsby-plugin-cockpit/helpers/asset.js index 6fcfc3e..fae8b5d 100644 --- a/gatsby-plugin-cockpit/helpers/asset.js +++ b/gatsby-plugin-cockpit/helpers/asset.js @@ -36,7 +36,7 @@ class AssetMapHelpers { this.createNode = createNode; this.collectionsItems = collectionsItems; this.config = config; - this.config.host = config.baseURL + config.folder; + this.config.host = config.baseURL; } addAllOtherImagesPathsToAssetsArray() { @@ -49,7 +49,7 @@ class AssetMapHelpers { if (entry[fieldname].path) { let path = entry[fieldname].path; if (!validUrl.isUri(path)) { - path = this.config.host + '/' + path; + path = this.config.host + path; } if (validUrl.isUri(path)) { this.assets.push({ @@ -89,4 +89,4 @@ class AssetMapHelpers { module.exports = { AssetMapHelpers, createAssetsMap, -}; \ No newline at end of file +}; From c613f6a46af87d6885a8465232d4938f3ed3a67d Mon Sep 17 00:00:00 2001 From: ukwilko Date: Thu, 30 Aug 2018 21:56:47 +0100 Subject: [PATCH 2/2] Update package.json --- gatsby-plugin-cockpit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatsby-plugin-cockpit/package.json b/gatsby-plugin-cockpit/package.json index ceb999f..c03c92c 100644 --- a/gatsby-plugin-cockpit/package.json +++ b/gatsby-plugin-cockpit/package.json @@ -2,7 +2,7 @@ "name": "gatsby-plugin-cockpit", "description": "Gatsby source plugin for Cockpit headless CMS API.", "author": "Paul Hayes ", - "version": "1.0.39", + "version": "1.0.40", "keywords": ["gatsby", "gatsby-plugin", "gatsby-source-plugin", "cockpit"], "license": "MIT", "dependencies": {