New plugin loader, page features, API0.2b, Bugfixes
This commit is contained in:
2
plugins/sitemap-xml/_plugin.php
Normal file
2
plugins/sitemap-xml/_plugin.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
addHead('<link rel="sitemap" type="application/xml" title="Sitemap" href="/plugins/sitemap-xml/sitemap.php" />', 'sitemap-xml');
|
6
plugins/sitemap-xml/info.json
Normal file
6
plugins/sitemap-xml/info.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Sitemap XML",
|
||||
"description": "Generates an XML file with the pages and posts all included.",
|
||||
"paths": "/page/*",
|
||||
"enabler": "yes"
|
||||
}
|
21
plugins/sitemap-xml/sitemap.php
Normal file
21
plugins/sitemap-xml/sitemap.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
header('Content-type: application/xml');
|
||||
|
||||
require_once "../../core.php";
|
||||
?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<url>
|
||||
<loc>https://sandros.hu/</loc>
|
||||
<changefreq>monthly</changefreq>
|
||||
</url>
|
||||
<?php
|
||||
$blog = new blog(null, null, true);
|
||||
if ($blog->entries)
|
||||
while ($data = $blog->entries())
|
||||
echo "\t<url>\n\t\t<loc>".$_set['url'].get_entry_link($data['entrySlug'])."</loc>\n\t\t<changefreq>monthly</changefreq>\n\t</url>";
|
||||
|
||||
$nav = get_navigation(null, true);
|
||||
foreach ($nav AS $index => $n)
|
||||
echo "\t<url>\n\t\t<loc>".$_set['url'].$n['link']."</loc>\n\t\t<changefreq>monthly</changefreq>\n\t</url>";
|
||||
?>
|
||||
</urlset>
|
Reference in New Issue
Block a user