Add page-specific CSS support
Add helper function to find page-specific CSS files Add CSS loading to base template Update rendering functions to include page CSS Update router to include page CSS for static pages
This commit is contained in:
parent
0b84615bf9
commit
6879fad5fb
7 changed files with 110 additions and 0 deletions
|
|
@ -136,6 +136,11 @@ switch ($parsedPath['type']) {
|
|||
$translations = $ctx->translations;
|
||||
$pageTitle = $metadata['title'] ?? null;
|
||||
$metaDescription = extractMetaDescription($dir, $metadata, $ctx->currentLang, $ctx->defaultLang);
|
||||
|
||||
// Check for page-specific CSS
|
||||
$pageCss = findPageCss($dir, $ctx->contentDir);
|
||||
$pageCssUrl = $pageCss['url'] ?? null;
|
||||
$pageCssHash = $pageCss['hash'] ?? null;
|
||||
|
||||
include $ctx->templates->base;
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue