Package
Spatie Laravel Sitemap
Create and generate sitemaps with ease
Overview
What Spatie Laravel Sitemap does
Spatie's Laravel Sitemap simplifies the process of generating sitemaps by crawling your entire site to automatically include all URLs.
For developers maintaining websites with many pages, building a complete and up-to-date sitemap can be a challenge. Spatie's Laravel Sitemap automates this task by crawling your entire site and generating a sitemap file effortlessly. This eliminates the need to manually add URLs, which makes keeping sitemaps current far less cumbersome.
Developers can execute this task with a straightforward Artisan command, which allows the entire site to be crawled and sitemaps to be generated directly to a file. For those who need a more customized approach, the package allows manual creation as well, where specific URLs can be added with details such as last modification dates. This flexibility means sitemaps can be fully automated, completely manual, or a mix of both.
An advanced feature of the package is its capability to split crawled URLs into multiple sitemap files. This feature is particularly useful for large sites, allowing content to be organized into logical sections, which can improve tracking and indexing in platforms like Google Search Console. This is accomplished by passing a closure that determines the path of each sitemap, and additional options allow the creation of sitemap indexes and the grouping of URLs into multiple files if limits are reached.
Laravel Sitemap also integrates seamlessly with Eloquent models, allowing models to implement a Sitemapable interface to directly add them to sitemaps. This feature gives developers precision control over how dynamic content is represented in the sitemap, further extending the package's flexibility and usefulness across different types of Laravel applications.
This overview was generated by AI from the package README and may not reflect the latest release.
Read the full README →