Skip to content
Open
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
13 changes: 13 additions & 0 deletions poster_data_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand All @@ -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 {
Expand Down