Skip to content

Commit

Permalink
sitemap generator: added info about crawler to generated sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
janreges committed Dec 20, 2023
1 parent b576eef commit 7cb7005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Crawler/Export/SitemapExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private function generateXmlSitemap(string $outputFile, array $urls): string
throw new Exception("Output file {$outputFile} is not writable. Check permissions.");
}

$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"></urlset>');
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"><!-- Sitemap generated using SiteOne Crawler - https://crawler.siteone.io/features/sitemap-generator/ --></urlset>');
foreach ($urls as $url) {
$urlElement = $xml->addChild('url');
$urlElement->addChild('loc', htmlspecialchars($url));
Expand Down

0 comments on commit 7cb7005

Please sign in to comment.