revert sitemapgenerator v5

This commit is contained in:
Fred Tempez 2025-01-06 18:25:14 +01:00
parent b8ec14e005
commit 51c5522f5e

View File

@ -1141,20 +1141,8 @@ class common
//require_once 'core/vendor/sitemap/SitemapGenerator.php';
$timezone = $this->getData(['config', 'timezone']);
$config = new \Icamys\SitemapGenerator\Config();
// Your site URL.
$config->setBaseURL(helper::baseurl(false));
// // OPTIONAL. Setting the current working directory to be output directory
$config->setSaveDirectory(sys_get_temp_dir());
$sitemap = new \Icamys\SitemapGenerator\SitemapGenerator($config);
// Create a compressed sitemap
$sitemap->enableCompression();
$outputDir = getcwd();
$sitemap = new \Icamys\SitemapGenerator\SitemapGenerator(helper::baseurl(false), $outputDir);
// will create also compressed (gzipped) sitemap : option buguée
// $sitemap->enableCompression();
@ -1253,6 +1241,7 @@ class common
}
return (file_exists('sitemap.xml') && file_exists('robots.txt'));
}