From 7f6d21d480e22765f438d5a80227f89c416b770b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 10 Jan 2023 20:47:38 -0400 Subject: bind more language vars, pass to generateDocumentHTML --- src/write/bind-utilities.js | 4 ++++ src/write/build-modes/live-dev-server.js | 10 +++------- 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({ -- cgit 1.3.0-6-gf8a5