Add Atom feed support

Add feed URL to base template
Refactor list item building into separate function
Improve date extraction logic
Add feed XML generation handler
Update template variables handling
This commit is contained in:
Ruben 2026-02-06 18:24:31 +01:00
parent b03511f99b
commit 1cbfb67a4c
4 changed files with 166 additions and 60 deletions

View file

@ -48,13 +48,16 @@ function renderTemplate(Context $ctx, string $content, int $statusCode = 200): v
$navigation = $ctx->navigation;
$homeLabel = $ctx->homeLabel;
$pageTitle = null;
$templateVars = Hooks::apply(Hook::TEMPLATE_VARS, [
'content' => $content,
'navigation' => $navigation,
'homeLabel' => $homeLabel,
'pageTitle' => $pageTitle
'pageTitle' => $ctx->get('pageTitle'),
'metaDescription' => $ctx->get('metaDescription'),
'pageCssUrl' => $ctx->get('pageCssUrl'),
'pageCssHash' => $ctx->get('pageCssHash'),
'feedUrl' => $ctx->get('feedUrl')
], $ctx);
extract($templateVars);