kwaadpepper / sitemap-refresh
Create sitemap.xml
2.3.2
2026-03-29 09:08 UTC
Requires
- php: ^8.3
- illuminate/support: ~11|~12|~13
- laravel/framework: ~11|~12|~13
- spatie/laravel-sitemap: ^7.4
Requires (Dev)
- larastan/larastan: ^3.9
- orchestra/testbench: ^9.0|^10.0|^11.0
- slevomat/coding-standard: ^8.11
README
Creates sitemap.xml and refresh using a config file
Installation
Via Composer
composer require kwaadpepper/sitemap-refresh
npm i puppeteer # Pour exec en JS
Usage
-
php artisan vendor:publish --tag=sitemap-refresh -
Change configuration in
config/sitemap-refresh.php -
You can test your configuration using
php artisan sitemap:refresh --dry-run -
If you wish to complete the sitemap (like if random models are displayed) run
php artisan sitemap:install, then add urls in app/lib/CompleteSitemapWith
URL generation notes
- Sitemap entries are normalized before being stored, so equivalent URLs like
https://example.comandhttps://example.com/are exported only once. - Default ports are removed during normalization and hosts are canonicalized to lowercase.
- Query strings are still ignored by the package unless you explicitly index them yourself.
- During sitemap generation,
app.urlis temporarily forced into Laravel's URL generator. This ensures URLs produced fromroute(),url()or customcompleteWithcallbacks stay on the same canonical domain as the crawler.
Change log
Please see the changelog for more information on what has changed recently.
License
MIT. Please see the license file for more information.