diff --git a/baker/SiteBaker.tsx b/baker/SiteBaker.tsx index ced0950867a..9fb72acd358 100644 --- a/baker/SiteBaker.tsx +++ b/baker/SiteBaker.tsx @@ -636,7 +636,7 @@ export class SiteBaker { const grapherRedirects = await getGrapherRedirectsMap("") await this.stageWrite( path.join(this.bakedSiteDir, `grapher/_grapherRedirects.json`), - JSON.stringify(Object.fromEntries(grapherRedirects)) + JSON.stringify(Object.fromEntries(grapherRedirects), null, 2) ) this.progressBar.tick({ name: "✅ baked redirects" }) diff --git a/baker/redirects.ts b/baker/redirects.ts index fa7d0192f39..5c48d66ebd5 100644 --- a/baker/redirects.ts +++ b/baker/redirects.ts @@ -68,20 +68,12 @@ export const getRedirects = async () => { }` ) - // Redirect old slugs to new slugs - const grapherRedirectsMap = await getGrapherRedirectsMap() - const grapherRedirects = Array.from(grapherRedirectsMap).map( - ([oldSlug, newSlug]) => `${oldSlug} ${newSlug} 302` - ) - // Add newlines in between so we get some more overview return [ ...staticRedirects, "", ...wpRedirects, "", - ...grapherRedirects, - "", ...dynamicRedirects, // Cloudflare requires all dynamic redirects to be at the very end of the _redirects file ] }