Add RSS file.
This commit is contained in:
parent
ff7d5f8e60
commit
bd816e74fb
32
pages/blog/rss.xml.php
Normal file
32
pages/blog/rss.xml.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
require 'config.php';
|
||||||
|
?>
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<rss version="2.0"
|
||||||
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<channel>
|
||||||
|
<title><?= $sitetitle ?></title>
|
||||||
|
<description><?= $description ?></description>
|
||||||
|
<link><?= $siteurl ?></link>
|
||||||
|
<?php
|
||||||
|
$dir_files = scandir(dirname(__FILE__), SCANDIR_SORT_DESCENDING);
|
||||||
|
foreach($dir_files as $file_info) {
|
||||||
|
if(!str_ends_with($file_info, ".cfg.php"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
require dirname(__FILE__) . "/" . $file_info;
|
||||||
|
?>
|
||||||
|
<item>
|
||||||
|
<title><?= $title ?></title>
|
||||||
|
<link><?= $siteurl ?>/blog/<?= $file_info ?></link>
|
||||||
|
<guid><?= $siteurl ?>/blog/<?= $file_info ?></guid>
|
||||||
|
<dc:date><?= $created ?>T00:00:00Z</dc:date>
|
||||||
|
<author><?= $author ?></author>
|
||||||
|
<description><?= $description ?></description>
|
||||||
|
</item>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
Loading…
x
Reference in New Issue
Block a user