summaryrefslogtreecommitdiff
path: root/changelog/rss.xml
diff options
context:
space:
mode:
authorsillylaird <sillylaird@fastmail.ca>2026-02-03 21:27:57 -0500
committersillylaird <sillylaird@fastmail.ca>2026-02-03 21:27:57 -0500
commit720d752748b793a2f5cf3cc14cb75ad86e8919c0 (patch)
tree29120103307cb17e7d6c283cc198ec2484f934cd /changelog/rss.xml
First commit
Diffstat (limited to 'changelog/rss.xml')
-rw-r--r--changelog/rss.xml30
1 files changed, 30 insertions, 0 deletions
diff --git a/changelog/rss.xml b/changelog/rss.xml
new file mode 100644
index 0000000..7a72398
--- /dev/null
+++ b/changelog/rss.xml
@@ -0,0 +1,30 @@
+<?php
+require __DIR__ . '/db.html';
+header("Content-Type: application/rss+xml; charset=UTF-8");
+echo '<?xml version="1.0" encoding="UTF-8"?>';
+?>
+<rss version="2.0">
+<channel>
+<title>SillyLaird Changelog</title>
+<link>https://www.sillylaird.ca/changelog/</link>
+
+<?php
+$stmt = $db->query("
+ SELECT title, body, created_at
+ FROM changelog
+ ORDER BY created_at DESC
+ LIMIT 20
+");
+while ($e = $stmt->fetch(PDO::FETCH_ASSOC)):
+?>
+<item>
+<title><?= htmlspecialchars($e['title']) ?></title>
+<pubDate><?= date(DATE_RSS, strtotime($e['created_at'])) ?></pubDate>
+<description><![CDATA[
+<?= nl2br(htmlspecialchars($e['body'])) ?>
+]]></description>
+</item>
+<?php endwhile; ?>
+
+</channel>
+</rss>