diff --git a/server/config-docs.ts b/server/config-docs.ts index ecbaff1a87..5394442c30 100644 --- a/server/config-docs.ts +++ b/server/config-docs.ts @@ -344,6 +344,16 @@ export const loadConfig = (version: string) => { ); } + const duplicateRedirects = checkDuplicateRedirects(config.redirects); + if (duplicateRedirects.length > 0) { + throw new Error( + "Error parsing docs config file " + + join("content", version, "docs", "config.json") + + ": Found redirects with duplicate sources: " + + JSON.stringify(duplicateRedirects, null, 2) + ); + } + validateConfig(validator, config); config.navigation.forEach((item, i) => {