Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Sitemap Lite

Laravel Sitemap Lite Laravel Package

benbjurstrom/laravel-sitemap-lite

Lightweight Laravel package for generating XML sitemaps with minimal configuration. Add sitemap support to your app so search engines can discover and index your pages, without the overhead of heavier sitemap libraries. Simple, fast, and easy to integrate.

Deep Wiki
Context7

Laravel Sitemap Lite is a lightweight package for generating XML sitemaps in Laravel applications. It offers a simple, fluent API to define URLs and produce standards-compliant sitemap files without the overhead of larger sitemap libraries. It integrates cleanly with Laravel's routing and caching, making it easy to serve sitemaps from a route or generate them on demand.

  • Simple, fluent API for registering URLs
  • Standards-compliant XML sitemap output
  • Sitemap index support for large sites
  • Optional caching for fast responses
  • Seamless Laravel route integration
Frequently asked questions about Laravel Sitemap Lite
How do I install benbjurstrom/laravel-sitemap-lite?
Install the package with Composer using composer require benbjurstrom/laravel-sitemap-lite. Laravel package discovery should register the service provider automatically. Publish any provided configuration file if you need to customize the package defaults.
Does Laravel Sitemap Lite support Eloquent models?
Yes, the package is designed so you can register Eloquent models and include their records in the generated sitemap. This avoids manually listing every URL when your content lives in the database. You choose which models are registered, so only the content you want is exposed.
How do I generate sitemap.xml in Laravel with this package?
You register the routes or Eloquent models that should appear in the sitemap, then expose the sitemap route so requests to sitemap.xml return XML. The package builds the search-engine-ready XML output for you. Caching is optional if you want to avoid regenerating it on every request.
Can I cache the generated Laravel sitemap?
Yes, optional caching is part of the package. Caching the generated XML reduces database queries and rendering work on repeated sitemap requests. You should clear or refresh the cache when your content changes so the sitemap stays accurate.
Does Laravel Sitemap Lite support sitemap indexes for large sites?
Yes, sitemap index support is intended for larger sites. You can split URLs across child sitemaps and have the main sitemap.xml reference them. This keeps individual sitemap files manageable for search engines.
Which Laravel versions are supported by laravel-sitemap-lite?
Check the package's composer.json on Packagist for the exact Laravel and PHP version constraints. Composer will enforce those requirements during installation. The package is built for modern Laravel applications, so verify compatibility before adding it to older projects.
How do I exclude routes or models from the Laravel sitemap?
You control the sitemap by choosing which routes or Eloquent models you register. Anything you do not register is not included in the generated XML. For model-based sitemaps, you can also constrain the query so only eligible records are passed to the package.
How can I test the sitemap in a Laravel application?
Use Laravel's HTTP testing helpers to request your sitemap route and assert the response. You can check the status code, XML content type, and that expected URLs appear in the output. For cached sitemaps, test both cache-miss and cache-hit behavior if caching is enabled.
Is Laravel Sitemap Lite suitable for production use?
Yes, it is intended for generating sitemaps in Laravel applications, including production sites. Enable caching to avoid regenerating the XML on every request. For sites with many URLs, use the sitemap index support to split content into multiple files.
What are alternatives to Laravel Sitemap Lite?
spatie/laravel-sitemap is a common alternative with a broader feature set. Laravel Sitemap Lite focuses on minimal setup for routes and Eloquent models, plus optional caching and sitemap indexes. Choose based on how much customization and automation your project needs.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo