Add default ignore routes
This commit is contained in:
parent
4fdae6d0e9
commit
f5e949bbd8
2 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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))) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue