diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 17:31:22 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 17:34:49 -0400 |
commit | d1aea23d39423547ba163491f3ebea76e8cfd98e (patch) | |
tree | 9440770937e93c12704755406ecc335b6b639d4c /src | |
parent | b846fd29b379788178abe084473c467b4d35a941 (diff) |
write: static-build: catch errors in Template.resolve also
Diffstat (limited to 'src')
-rw-r--r-- | src/write/build-modes/static-build.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index eb2f6fe3..d2802f4e 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -301,9 +301,9 @@ export async function go({ wikiData, }); - let topLevelResult; + let pageHTML, oEmbedJSON; try { - topLevelResult = + const topLevelResult = quickEvaluate({ contentDependencies, extraDependencies: {...bound, appendIndexHTML}, @@ -311,6 +311,8 @@ export async function go({ name: page.contentFunction.name, args: page.contentFunction.args ?? [], }); + + ({pageHTML, oEmbedJSON} = html.resolve(topLevelResult)); } catch (error) { logError`\rError generating page: ${pathname}`; niceShowAggregate(error); @@ -318,8 +320,6 @@ export async function go({ return; } - const {pageHTML, oEmbedJSON} = html.resolve(topLevelResult); - return writePage({ pageHTML, oEmbedJSON, |