diff options
Diffstat (limited to 'src/write/build-modes')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 7 | ||||
-rw-r--r-- | src/write/build-modes/static-build.js | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index a5d9da97..bdd4561e 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -83,17 +83,14 @@ export async function go({ else if (page.type === 'redirect') servePath = page.fromPath; - const fullKey = 'localized.' + servePath[0]; - const urlArgs = servePath.slice(1); - return Object.values(languages).map(language => { const baseDirectory = language === defaultLanguage ? '' : language.code; const pathname = getPagePathname({ baseDirectory, - fullKey, - urlArgs, + pageSubKey: servePath[0], + urlArgs: servePath.slice(1), urls, }); diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index 0e8c4b07..edfb02c2 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -267,7 +267,6 @@ export async function go({ ...pageWrites.map(page => () => { const pageSubKey = page.path[0]; const urlArgs = page.path.slice(1); - const fullKey = 'localized.' + pageSubKey; const localizedPathnames = getPagePathnameAcrossLanguages({ defaultLanguage, @@ -279,7 +278,7 @@ export async function go({ const pathname = getPagePathname({ baseDirectory, - fullKey, + pageSubKey, urlArgs, urls, }); @@ -345,7 +344,7 @@ export async function go({ outputDirectory: path.join(outputPath, getPagePathname({ baseDirectory, device: true, - fullKey, + pageSubKey, urlArgs, urls, })), @@ -373,7 +372,7 @@ export async function go({ outputDirectory: path.join(outputPath, getPagePathname({ baseDirectory, device: true, - fullKey: 'localized.' + fromPath[0], + pageSubKey: fromPath[0], urlArgs: fromPath.slice(1), urls, })), |