Skip to content

Commit ad67268

Browse files
authored
fix: correctly compress sitemap.xml (#188)
1 parent 8d37ffb commit ad67268

9 files changed

+1
-1
lines changed

src/Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function dumpSitemap(Sitemapindex|Urlset $sitemap, bool $deflate): void
167167
}
168168

169169
/** @var string $content */
170-
$content = $deflate ? gzdeflate($sitemap->toXml()) : $sitemap->toXml();
170+
$content = ($deflate ? gzencode($sitemap->toXml()) : $sitemap->toXml());
171171
$this->filesystem->dumpFile($this->buildDir.str_replace($this->generateUrl(''), '', $path), $content);
172172
}
173173
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)