summaryrefslogtreecommitdiff
path: root/src/web/_views/blog/rss.php
blob: 830ae34e47cfd446c511e99c2c9ca9cc4738b8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php /* Copyright (c) 2024 Freya Murphy */ ?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><?=lang('title')?></title>
		<link><?=$this->get_url('blog')?></link>
		<description><?=lang('blog_short_desc')?></description>
		<language><?=lang('lang_short')?></language>
	<?php
		foreach ($blog as $name => $post) {
			$name = substr($name, 0, -3);
			echo '<item>';
			echo '<title>' . $post['meta']['name'] . '</title>';
			echo '<description>' . $post['meta']['desc'] . '</description>';
			echo '<pubDate>' . $post['meta']['date'] . '</pubDate>';
			echo '<link>' . $this->get_url('blog/post/' . $name) . '</link>';
			echo '<guid>' . $this->get_url('blog/post/' . $name) . '</guid>';
			echo '</item>';
		}
	?>
	</channel>
</rss>