From f1b0770740f65e50189cacaa3308a5aaa8be8560 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 21 Feb 2020 22:10:07 +0000 Subject: Remove un-need stuff --- listeners/GenerateSitemap.php | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 listeners/GenerateSitemap.php (limited to 'listeners/GenerateSitemap.php') diff --git a/listeners/GenerateSitemap.php b/listeners/GenerateSitemap.php deleted file mode 100644 index 6a439a6..0000000 --- a/listeners/GenerateSitemap.php +++ /dev/null @@ -1,43 +0,0 @@ -getConfig('baseUrl'); - - if (! $baseUrl) { - echo("\nTo generate a sitemap.xml file, please specify a 'baseUrl' in config.php.\n\n"); - - return; - } - - $sitemap = new Sitemap($jigsaw->getDestinationPath() . '/sitemap.xml'); - - collect($jigsaw->getOutputPaths()) - ->reject(function ($path) { - return $this->isExcluded($path); - })->each(function ($path) use ($baseUrl, $sitemap) { - $sitemap->addItem(rtrim($baseUrl, '/') . $path, time(), Sitemap::DAILY); - }); - - $sitemap->write(); - } - - public function isExcluded($path) - { - return Str::is($this->exclude, $path); - } -} -- cgit v1.2.3-13-gbd6f