From d0c7eea2d15198233aa4756fb4de4a533806aa67 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 29 Apr 2024 19:23:05 +0200 Subject: [PATCH] fix(spas): use en-US in canonical for Plus docs --- build/spas.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/spas.ts b/build/spas.ts index bc0206a5c5f6..cfa7b3ecd62e 100644 --- a/build/spas.ts +++ b/build/spas.ts @@ -227,7 +227,8 @@ export async function buildSPAs(options: { const file = filepath.replace(dirpath, ""); const page = file.split(".")[0]; - const locale = DEFAULT_LOCALE.toLowerCase(); + const locale = DEFAULT_LOCALE; + const pathLocale = locale.toLowerCase(); const markdown = fs.readFileSync(filepath, "utf-8"); const frontMatter = frontmatter(markdown); @@ -250,7 +251,7 @@ export async function buildSPAs(options: { const html = renderPage(url, context); const outPath = path.join( BUILD_OUT_ROOT, - locale, + pathLocale, ...slug.split("/"), page );