diff options
author | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-06-30 00:07:21 +0200 |
---|---|---|
committer | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-06-30 00:07:21 +0200 |
commit | 1f23d65f32e37d0c6d703951d6735c9926f8521c (patch) | |
tree | 57cd1399dd05a088b2a2fb3d6bdc5d0dc3a2961b /_site/feed.xml/index.php | |
parent | 5c5014a95ae79af4b052b5011e7d0c11d6eae6a6 (diff) | |
download | unchainedtech-1f23d65f32e37d0c6d703951d6735c9926f8521c.tar.gz unchainedtech-1f23d65f32e37d0c6d703951d6735c9926f8521c.tar.bz2 unchainedtech-1f23d65f32e37d0c6d703951d6735c9926f8521c.zip |
Really done this time
Diffstat (limited to '_site/feed.xml/index.php')
-rw-r--r-- | _site/feed.xml/index.php | 43 |
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 |