ldc-sitemap-generator/config/sitemap-generator.php
Jérémy Munsch 0b533b396f
docs: update changelog and README for new config keys
- Clarified configurable output settings in README.
- Updated changelog to reflect changes in config keys and structure.
2026-10-15 14:54:37 +02:00

79 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
return [
/**
* Single route names
*
* Ex:
*
* 'single_pages' => [
* 'homepage',
* ],
*/
'single_pages' => [],
/**
* Model namespaces with filters
*
* Ex: (model_filters & relation_filters are not necessaries)
* 'cruds' => [
* [
* 'model' => 'App\Models\Product',
* 'model_filters' => [
* ['published', '=', true]
* ],
* 'relation_filters' => [
* 'range' => fn(Builder $q) => $q->where('status', true),
* ],
* 'allow_null_relation' => ['range'],
* ],
* [
* 'model' => 'App\Models\Article',
* ]
* ],
*/
'cruds' => [],
/**
* Enable or disable schedule for the job
* If set to true the sitemap generator will be run
* using the 'cron' instruction
*/
'schedule' => true,
/**
* If you want to set specific
* instruction for when to schedule job
* you can set this with a cron instruction
* You can generate one using https://crontab.guru/
*
* schedule must be set to true
*
* Default is every day at 15:45
*/
'cron' => '45 15 * * *',
/**
* All supported locales in the project.
* When used with mcamara/laravel-localization, you can get the values from the package config :
* 'supported_locales' => array_keys(config('laravellocalization.supportedLocales', ['fr' => "Fr"]))
*/
'supported_locales' => ['fr'],
/**
* The location where the sitemap file should be generated.
*/
'output' => [
'storage_disk' => 'public',
'path' => 'sitemap.xml',
],
/**
* The route localizer strategy to use.
* Supported: 'default', 'mcamara', or a custom class implementing RouteLocalizerInterface.
*/
'localizer' => 'default',
];