From 72fc7bdc6b1dfd858c108c578c8d73a5ad40cbcd Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 29 Jun 2019 02:21:02 +0200 Subject: [PATCH] widget/sitemap: find and list all site pages --- widget/sitemap.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 widget/sitemap.php diff --git a/widget/sitemap.php b/widget/sitemap.php new file mode 100644 index 0000000..9b03e2f --- /dev/null +++ b/widget/sitemap.php @@ -0,0 +1,32 @@ +getFilename()[0] === '.') { + # skip hidden files and directories + return FALSE; + } + if ($current->isLink()) { + # ignore symlinks, original contents only + return FALSE; + } + return $current->isDir() + || preg_match('/\.html$/', $current->getFilename()); + } +); + +print '\n"; -- 2.30.0