haha oops
This commit is contained in:
parent
32eab358a6
commit
4629a55b90
|
@ -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)
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue