aboutsummaryrefslogtreecommitdiff
path: root/_site/feed.xml/index.php
diff options
context:
space:
mode:
Diffstat (limited to '_site/feed.xml/index.php')
-rw-r--r--_site/feed.xml/index.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/_site/feed.xml/index.php b/_site/feed.xml/index.php
new file mode 100644
index 0000000..a1fa3df
--- /dev/null
+++ b/_site/feed.xml/index.php
@@ -0,0 +1,43 @@
+<?php
+
+header("Content-Type: application/xml");
+echo('<?xml version="1.0" encoding="UTF-8" ?>');
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/markdown.php";
+$Parsedown = new Parsedown();
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/articles/getlist.php";
+$list = getArticlesList();
+
+?>
+
+<rss version="2.0">
+
+ <!--
+
+ This is Blogchain's RSS feed!
+ Only the last 10 articles are shown to preserve your and my bandwidth.
+
+ Blogchain is
+ (c) Blogchain Authors, All rights reserved.
+
+ -->
+
+ <channel>
+ <title>Blogchain</title>
+ <link>https://blogchain.minteck.ro.lt</link>
+ <description>Blogchain is a tech-centric blog written by two people on their free time</description>
+ <copyright><?= date('Y') ?> Blogchain Authors, All rights reserved.</copyright>
+ <language>en-us</language>
+ <?php $index = 0; foreach ($list as $item): ?>
+ <?php if ($index < 10): ?>
+ <item>
+ <title><?= $item["title"] ?></title>
+ <link>https://blogchain.minteck.ro.lt/article/<?= $item["id"] ?></link>
+ <description><?= $item["content"]["full"] ?></description>
+ </item>
+ <?php endif; ?>
+ <?php $index++; endforeach; ?>
+ </channel>
+
+</rss> \ No newline at end of file