From b149e73fcd30602fd2312e26aca86c2b769bbc01 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 2 Aug 2023 21:54:46 -0300 Subject: infra: html: make deep Template resolving opt-in via utility Just always resolving was causing some bugs. --- src/write/build-modes/live-dev-server.js | 3 ++- src/write/build-modes/static-build.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/write') diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index 6734c065..a87da27b 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -11,6 +11,7 @@ import {serializeThings} from '../../data/serialize.js'; import * as pageSpecs from '../../page/index.js'; import {logInfo, logWarn, progressCallAll} from '../../util/cli.js'; +import * as html from '../../util/html.js'; import {empty} from '../../util/sugar.js'; import { getPagePathname, @@ -365,7 +366,7 @@ export async function go({ args: page.contentFunction.args ?? [], }); - const {pageHTML} = topLevelResult.content; + const {pageHTML} = html.resolve(topLevelResult); if (!quietResponses) console.log(`${requestHead} [200] ${pathname}`); response.writeHead(200, contentTypeHTML); diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index 8bc1b242..fb9661ba 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -309,7 +309,7 @@ export async function go({ args: page.contentFunction.args ?? [], }); - const {pageHTML, oEmbedJSON} = topLevelResult.content; + const {pageHTML, oEmbedJSON} = html.resolve(topLevelResult); return writePage({ pageHTML, -- cgit 1.3.0-6-gf8a5