diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 20:47:38 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 20:47:38 -0400 |
commit | 7f6d21d480e22765f438d5a80227f89c416b770b (patch) | |
tree | f23afc29f3e5da987bb9757d042f827e5fe50eb5 | |
parent | 7bca1c6b41f7df9a20dd73872c7b1e9653776485 (diff) |
bind more language vars, pass to generateDocumentHTML
-rw-r--r-- | src/write/bind-utilities.js | 4 | ||||
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 10 | ||||
-rw-r--r-- | src/write/build-modes/static-build.js | 10 |
3 files changed, 10 insertions, 14 deletions
diff --git a/src/write/bind-utilities.js b/src/write/bind-utilities.js index 4b037a91..6212b824 100644 --- a/src/write/bind-utilities.js +++ b/src/write/bind-utilities.js @@ -52,8 +52,10 @@ import { export function bindUtilities({ absoluteTo, + defaultLanguage, getSizeOfAdditionalFile, language, + languages, to, urls, wikiData, @@ -65,9 +67,11 @@ export function bindUtilities({ Object.assign(bound, { absoluteTo, + defaultLanguage, getSizeOfAdditionalFile, html, language, + languages, to, urls, wikiData, diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index a4c4c871..0e2b6160 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -278,8 +278,10 @@ export async function go({ const bound = bindUtilities({ absoluteTo, + defaultLanguage, getSizeOfAdditionalFile, language, + languages, to, urls, wikiData, @@ -288,19 +290,13 @@ export async function go({ const pageInfo = page.page(bound); const pageHTML = generateDocumentHTML(pageInfo, { + ...bound, cachebust, - defaultLanguage, developersComment, - getThemeString: bound.getThemeString, - language, - languages, localizedPathnames, oEmbedJSONHref: null, // No oEmbed support for live dev server pagePath: servePath, pathname, - to, - transformMultiline: bound.transformMultiline, - wikiData, }); console.log(`${requestHead} [200] ${pathname}`); diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index 691ce579..220e51f4 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -292,8 +292,10 @@ export async function go({ const bound = bindUtilities({ absoluteTo, + defaultLanguage, getSizeOfAdditionalFile, language, + languages, to, urls, wikiData, @@ -315,19 +317,13 @@ export async function go({ .to('shared.path', pathname + 'oembed.json'); const pageHTML = generateDocumentHTML(pageInfo, { + ...bound, cachebust, - defaultLanguage, developersComment, - getThemeString: bound.getThemeString, - language, - languages, localizedPathnames, oEmbedJSONHref, pagePath, pathname, - to, - transformMultiline: bound.transformMultiline, - wikiData, }); return writePage({ |