Возвращен sitemap

This commit is contained in:
2019-01-02 17:00:35 +03:00
parent 28215491ca
commit ca22c7afd8
7 changed files with 150 additions and 4 deletions

View File

@ -41,7 +41,13 @@ class HtmlPrettier implements EventSubscriberInterface
/** @var \Sculpin\Core\Source\SourceInterface $source */
foreach ($sourceSet->allSources() as $source) {
$filename = $source->filename();
if ($this->endsWith($filename, '.md') || $this->endsWith($filename, '.html.twig')) {
$isSuitable = $filename === 'sitemap.xml'
|| $this->endsWith($filename, '.md')
|| $this->endsWith($filename, '.html.twig')
;
if ($isSuitable) {
yield $source;
}
}