diff --git a/automatically-updating-pureblog-sitemap.php b/automatically-updating-pureblog-sitemap.php new file mode 100644 index 0000000..d4fce4a --- /dev/null +++ b/automatically-updating-pureblog-sitemap.php @@ -0,0 +1,42 @@ + null]); + +?> + +
+

Sitemap

+ +"; + +foreach ($files as $file) { + if ($file !== "." && $file !== "..") { + $name = pathinfo($file, PATHINFO_FILENAME); + $path = $directory . '/' . $file; + $contents = file_get_contents($path); + + preg_match('/^title:\s*(.+)$/m', $contents, $matches); + + $title = $matches[1] ?? pathinfo($file, PATHINFO_FILENAME); + + $url = '/' . pathinfo($file, PATHINFO_FILENAME); + + echo '
  • 🛸 ' + . htmlspecialchars(trim($title)) + . '
  • '; +} +} +echo ""; +?> + +
    + null]); ?> + + \ No newline at end of file