world-game/site/templates/expertise.json.php
isUnknown 3a2b5a2f57
All checks were successful
Deploy / Deploy to Production (push) Successful in 21s
Perf: optimisation vidéos page expertise
- Vidéos recompressées (CRF 23, faststart) : 13MB → 3.4MB et 3.7MB
- Champs Kirby dynamiques pour vidéo normale et inverse
- Sources dynamiques via data.backgroundVideo / data.backgroundVideoReverse

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 15:54:49 +01:00

15 lines
537 B
PHP

<?php
$specificData = [
'pageTitle' => $page->writer()->value(),
'backgroundVideo' => $page->backgroundVideo()->toFile()?->url(),
'backgroundVideoReverse' => $page->backgroundVideoReverse()->toFile()?->url(),
'items' => $page->body()->toBlocks()->filter(fn($b) => $b->type() === 'text')->map(fn($block) => [
'text' => $block->text()->value()
])->values()
];
$pageData = array_merge($genericData, $specificData);
header('Content-Type: application/json');
echo json_encode($pageData);