404 - Not Found
The requested file could not be found.
", 404);
-}
function renderMultipleFiles(Context $ctx, array $files, string $pageDir): void {
// Load metadata and page plugins BEFORE rendering content files
diff --git a/app/router.php b/app/router.php
index c4e61dd..64e706a 100644
--- a/app/router.php
+++ b/app/router.php
@@ -110,9 +110,6 @@ switch ($parsedPath['type']) {
$listTemplate = $ctx->templates->list;
if (isset($metadata['page_template']) && !empty($metadata['page_template'])) {
$templateName = $metadata['page_template'];
- if (!str_ends_with($templateName, '.php')) {
- $templateName .= '';
- }
$customTemplate = dirname(__DIR__) . "/custom/templates/$templateName.php";
$defaultTemplate = __DIR__ . "/default/templates/$templateName.php";
@@ -186,6 +183,8 @@ switch ($parsedPath['type']) {
// Check for page-specific CSS
$pageCss = findPageCss($dir, $ctx->contentDir);
+ $pageCssUrl = $pageCss['url'] ?? null;
+ $pageCssHash = $pageCss['hash'] ?? null;
// Let plugins add template variables
$templateVars = Hooks::apply(Hook::TEMPLATE_VARS, [
@@ -193,7 +192,8 @@ switch ($parsedPath['type']) {
'homeLabel' => $homeLabel,
'pageTitle' => $pageTitle,
'metaDescription' => $metaDescription,
- 'pageCss' => $pageCss,
+ 'pageCssUrl' => $pageCssUrl,
+ 'pageCssHash' => $pageCssHash,
'items' => $items,
'pageContent' => $pageContent
], $ctx);