feat: add custom 404 page rendered via the site layout

This commit is contained in:
Pontoporeia
2026-08-24 11:32:02 +02:00
parent e9747edce0
commit 7938ab39c0
5 changed files with 112 additions and 1 deletions
+6 -1
View File
@@ -70,7 +70,12 @@ class Dispatcher
$route = $this->matchRoute();
if (!$route) {
http_response_code(404);
echo '<h1>404 — Page non trouvée</h1>';
$this->render('public/not-found', [
'pageTitle' => 'Page non trouvée',
'metaDescription' => '',
'bodyClass' => 'page-not-found',
'extraCss' => ['/assets/dist/not-found.min.css'],
]);
return;
}