haha oops

This commit is contained in:
Alexis Marie Wright 2022-03-14 01:57:45 -04:00
parent 32eab358a6
commit 4629a55b90
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,8 @@ include_once('config/default.php');
function generateFeed($content) {
$loader = new \Twig\Loader\FilesystemLoader('templates/');
$twig = new \Twig\Environment($loader, [
'autoescape' => false
'autoescape' => false,
'strict_variables' => true
]);
$ts = time();
@ -25,6 +26,7 @@ function generateFeed($content) {
$items[] = $twig->render('item.xml', [
'title' => htmlspecialchars($page->pageNo . " // " . $page->title),
'date' => $now,
'url' => $page->href,
'content' => htmlspecialchars($content)
]);
};

View File

@ -11,6 +11,7 @@ include_once('config/default.php');
include_once('lib/log.php');
include_once('lib/fetch-site-content.php');
include_once('lib/generate-feed.php');
$content = fetchSiteContent();
$feedXml = generateFeed(array_reverse($content));