From bdd7be61b015358fa41b7201325e0e177f44a582 Mon Sep 17 00:00:00 2001 From: Lightling Date: Wed, 16 Oct 2024 18:05:23 -0400 Subject: [PATCH] fix entries being saved to wrong spot currently placeholder to allow for option for embeddedEntries --- projects/sites/scripts/cms-to-static.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/sites/scripts/cms-to-static.js b/projects/sites/scripts/cms-to-static.js index 2b20689..71bdb13 100644 --- a/projects/sites/scripts/cms-to-static.js +++ b/projects/sites/scripts/cms-to-static.js @@ -73,6 +73,11 @@ const saveVariantsToDestination = async (inVal, fetchUrl, destination, destinati const thumbnailPath = `${entryPath}/${variant.thumbnailUrl.replace('/uploads/', '')}`; saveFileFromUrl(`http://${rootUrl}${variant.thumbnailUrl}`, thumbnailPath); outVal.entries[entryId].variants[index].thumbnailUrl = `/content/${destinationShort}/${entryId}/${variant.thumbnailUrl.replace('/uploads/', '')}`; + + if (true) { + await writeFile(`${entryPath}/info.json`, JSON.stringify(outVal.entries[entryId], null, 2)); + outVal.entries[entryId] = `/content/${destinationShort}/${entryId}/info.json`; + } })); }));