diff --git a/docs.json b/docs.json index e2c0bd26c..52cb5a265 100644 --- a/docs.json +++ b/docs.json @@ -6740,19 +6740,23 @@ }, { "source": "/onboarding/start-here", - "destination": "/start-here" + "destination": "/start-here", + "permanent": false }, { "source": "/onboarding/get-support", - "destination": "/get-support" + "destination": "/get-support", + "permanent": false }, { "source": "/onboarding/from-ethereum", - "destination": "/from-ethereum" + "destination": "/from-ethereum", + "permanent": false }, { "source": "/onboarding/more-tutorials", - "destination": "/more-tutorials" + "destination": "/more-tutorials", + "permanent": false } ] } diff --git a/scripts/check-redirects.mjs b/scripts/check-redirects.mjs index 9b40c05c9..7c6f3f9ba 100644 --- a/scripts/check-redirects.mjs +++ b/scripts/check-redirects.mjs @@ -92,6 +92,16 @@ const checkUnique = (config) => { ), ); } + const noExplicitPermanent = redirects.filter((it) => it.permanent === undefined || typeof it.permanent !== 'boolean'); + if (noExplicitPermanent.length !== 0) { + errors.push( + composeErrorList( + 'Found sources with unset `permanent` field (neither `true` nor `false`):', + noExplicitPermanent.map(it => it.source), + 'All redirects must set the `permanent` field to a boolean value!' + ) + ) + } // If there are any errors if (errors.length !== 0) { return {