diff --git a/src/Lib/SitemapGenerator.php b/src/Lib/SitemapGenerator.php index ee24c46..052452e 100644 --- a/src/Lib/SitemapGenerator.php +++ b/src/Lib/SitemapGenerator.php @@ -23,6 +23,15 @@ final class SitemapGenerator /** @var \Spatie\Sitemap\Sitemap */ private $siteMap = null; + /** + * Default routes to ignore + * + * @var string[] + */ + private static $defaultIgnoreRoutes = [ + 'ignition.' + ]; + /** * SitemapGenerator */ diff --git a/src/Traits/SitemapRouteConditions.php b/src/Traits/SitemapRouteConditions.php index 6c343f1..2aef3ea 100644 --- a/src/Traits/SitemapRouteConditions.php +++ b/src/Traits/SitemapRouteConditions.php @@ -36,7 +36,7 @@ trait SitemapRouteConditions throw new \Error('ignoreRoutes can take only string with route name or url'); } return $value; - }); + })->concat(static::$defaultIgnoreRoutes); self::$queryConditions = \collect(\config('refresh-sitemap.queryConditions', self::$queryConditions)) ->mapWithKeys(function ($value, $index) { if (!\is_string($index) or !(\is_string($value) || \is_bool($value))) {