diff --git a/poster_data_utils.js b/poster_data_utils.js index 7c77da6bf..4687a85c3 100644 --- a/poster_data_utils.js +++ b/poster_data_utils.js @@ -11,6 +11,10 @@ const getGroupsBySlug = async graphql => { const allPosterPdfsByRelativeDirectory = indexByRelativeDirectory( await query_poster_pdfs(graphql), ) + + forceLinuxStylePath(allPosterPdfsByRelativeDirectory) + forceLinuxStylePath(allPosterPrevImagesByRelativeDirectory) + const groups = glob .sync("content/posters/**/group_info.yaml") .map(pathToGroupInfo => @@ -24,6 +28,15 @@ const getGroupsBySlug = async graphql => { return groupBy(groups, group => `/${group["year"]}/Q${group["quarter"]}`) } +const forceLinuxStylePath = (somethingByRelativeDirectory) => { + Object.keys(somethingByRelativeDirectory).forEach(key => { + if (!key.includes("\\")) return; + let newkey = key.replace(/\\/g, "/"); + somethingByRelativeDirectory[newkey] = somethingByRelativeDirectory[key]; + delete somethingByRelativeDirectory[key]; + }); +} + const query_poster_prev_images = async graphql => { return await graphql(` query {