perf(site): serve responsive WebP and compressed Hub videos

This commit is contained in:
DCCONSTRUCTIONS
2026-11-06 03:24:43 +03:00
parent 1b4fe33957
commit f7951374a8
204 changed files with 2438 additions and 128 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import { execFileSync } from 'node:child_process';
test('image opening is opt-in per carousel and survives ordinary model rendering', async t => {
const root = await mkdtemp(join(tmpdir(), 'nodedc-carousel-'));
t.after(() => rm(root, { recursive: true, force: true }));
for (const path of ['tools', 'templates', 'content']) await cp(new URL('../'+path, import.meta.url), join(root,path), {recursive:true});
for (const path of ['tools', 'templates', 'content', 'assets/uploads/optimized']) await cp(new URL('../'+path, import.meta.url), join(root,path), {recursive:true});
const modelPath = join(root, 'content/pages/home.json');
const page = JSON.parse(await readFile(modelPath, 'utf8'));
const galleries = page.regions.flatMap(r=>r.blocks).filter(b=>b.content?.sliderItems);