]> git.bts.cx Git - garden.git/blob - templates/atom.php
Initial release
[garden.git] / templates / atom.php
1 <?= '<?xml version="1.0" encoding="utf-8"?>'."\n" /* So some installs of PHP don't get confused... */ ?>
2 <feed xmlns="http://www.w3.org/2005/Atom">
3         <id><?= garden_site_url('/'); ?>/</id>
4
5         <title><?= $site_name; ?></title>
6
7         <updated><?= date(DATE_RFC3339, $recent_items[0]->date) ?></updated>
8
9         <link href="<?= garden_site_url('feed.atom'); ?>" rel="self" type="application/atom+xml" />
10         <link href="<?= garden_site_url('/'); ?>" rel="alternate" type="text/html" />
11
12         <author>
13                 <name><?= $site_author ?></name>
14         </author>
15
16 <?php foreach ($recent_items as $update): ?>
17         <entry>
18                 <id><?= $update->url ?></id>
19                 <title><?= $update->title ?></title>
20                 <updated><?= date(DATE_RFC3339, $update->date) ?></updated>
21                 <link href="<?= $update->url ?>" rel="alternate" type="text/html" />
22                 <summary>An update was published.</summary>
23                 <content type="xhtml">
24                         <div xmlns="http://www.w3.org/1999/xhtml">
25                                 An update was published.
26                         </div>
27                 </content>
28         </entry>
29 <?php endforeach; ?>
30
31 </feed>