website/src/web/_views/apps/blog_rss.php
2024-05-24 09:05:42 -04:00

20 lines
715 B
PHP

<?php /* Copyright (c) 2024 Freya Murphy */ ?>
<rss version="2.0">
<channel>
<title><?=lang('title')?></title>
<link><?=lang('root_url') . '/blog'?></link>
<description><?=lang('blog_short_desc')?></description>
<language><?=lang('lang_short')?></language>
<?php
foreach ($blog as $name => $post) {
echo '<item>';
echo '<title>' . $post['meta']['name'] . '</title>';
echo '<description>' . $post['meta']['desc'] . '</description>';
echo '<pubDate>' . $post['meta']['date'] . '</pubDate>';
echo '<link>' . lang('root_url') . '/blog/post?name=' . $name . '</link>';
echo '<guid>' . lang('root_url') . '/blog/post?name=' . $name . '</guid>';
echo '</item>';
}
?>
</channel>
</rss>