diff --git a/blog.php b/blog.php index 311503a..41c7a52 100644 --- a/blog.php +++ b/blog.php @@ -219,6 +219,15 @@ apcu_store('posts', $posts, CACHE_POSTS_TTL); $CMS_INDEXING = false; } + + if (isset($CMS_SITEMAP)) { + foreach($posts as $k=>$v) { + if ($v->isPublic) { + echo "\n\t" . htmlspecialchars($v->permalink) . "\n\n"; + } + } + return; + } if (!isset($CMS_RSS)) diff --git a/sitemap.php b/sitemap.php new file mode 100644 index 0000000..5dabd5e --- /dev/null +++ b/sitemap.php @@ -0,0 +1,24 @@ + + + +\n\t" . htmlspecialchars($url) . "\n\n"; + } + require "blog.php"; +?> + +