Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Asset path incorrect #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gatsby-plugin-cockpit/helpers/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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({
Expand Down Expand Up @@ -89,4 +89,4 @@ class AssetMapHelpers {
module.exports = {
AssetMapHelpers,
createAssetsMap,
};
};
2 changes: 1 addition & 1 deletion gatsby-plugin-cockpit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gatsby-plugin-cockpit",
"description": "Gatsby source plugin for Cockpit headless CMS API.",
"author": "Paul Hayes <[email protected]>",
"version": "1.0.39",
"version": "1.0.40",
"keywords": ["gatsby", "gatsby-plugin", "gatsby-source-plugin", "cockpit"],
"license": "MIT",
"dependencies": {
Expand Down