diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 20:20:18 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 20:20:18 -0400 |
commit | 54ad9946e3fa32ae8388d54ec8b3baad78a29417 (patch) | |
tree | bdf130e83a41ccf2f71a2de1c02e6189f355f0b3 /src/write/build-modes/static-build.js | |
parent | fd59ddd05bdfebf2f9a55a0fa5915485929e7de6 (diff) |
prefer passing around pagePath
Diffstat (limited to 'src/write/build-modes/static-build.js')
-rw-r--r-- | src/write/build-modes/static-build.js | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index edfb02c2..5141891c 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -265,30 +265,27 @@ export async function go({ await progressPromiseAll(`Writing ${language.code}`, queue([ ...pageWrites.map(page => () => { - const pageSubKey = page.path[0]; - const urlArgs = page.path.slice(1); + const pagePath = page.path; const localizedPathnames = getPagePathnameAcrossLanguages({ defaultLanguage, languages, - pageSubKey, - urlArgs, + pagePath, urls, }); const pathname = getPagePathname({ baseDirectory, - pageSubKey, - urlArgs, + pagePath, urls, }); const to = getURLsFrom({ urls, baseDirectory, - pageSubKey, + pagePath, subdirectoryPrefix: getPageSubdirectoryPrefix({ - urlArgs: page.path.slice(1), + pagePath, }), }); @@ -330,11 +327,10 @@ export async function go({ languages, localizedPathnames, oEmbedJSONHref, - pageSubKey, + pagePath, pathname, to, transformMultiline: bound.transformMultiline, - urlArgs, wikiData, }); @@ -344,8 +340,7 @@ export async function go({ outputDirectory: path.join(outputPath, getPagePathname({ baseDirectory, device: true, - pageSubKey, - urlArgs, + pagePath, urls, })), }); @@ -358,9 +353,9 @@ export async function go({ const to = getURLsFrom({ urls, baseDirectory, - pageSubKey: fromPath[0], + pagePath: fromPath, subdirectoryPrefix: getPageSubdirectoryPrefix({ - urlArgs: fromPath.slice(1), + pagePath: fromPath, }), }); @@ -372,8 +367,7 @@ export async function go({ outputDirectory: path.join(outputPath, getPagePathname({ baseDirectory, device: true, - pageSubKey: fromPath[0], - urlArgs: fromPath.slice(1), + pagePath: fromPath, urls, })), }); |