Skip to content

Commit 5ed14aa

Browse files
committed
pass global.data.js output to template vars
Templates received only global.vars.js output in vars, while pages received both global.vars.js and global.data.js output via PageData.vars. This inconsistency forced every template that needed aggregated data to re-derive it from the pages array, duplicating logic from global.data.js. Merging globalDataVars into the globalVars object passed to templateBuilder makes template vars consistent with how page vars already work.
1 parent 5134ccc commit 5ed14aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/build-pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export async function buildPagesDirect (src, dest, siteData, _opts) {
276276
const buildResult = await templateBuilder({
277277
src,
278278
dest,
279-
globalVars,
279+
globalVars: { ...globalVars, ...globalDataVars },
280280
template,
281281
pages,
282282
})

0 commit comments

Comments
 (0)