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

Sitemap Extension Laravel Package

anomaly/sitemap-extension

A Laravel/PHP extension for the Anomaly Sitemap package, providing additional sitemap generation features and integration hooks to help customize and extend sitemap output in your application.

View on GitHub
Deep Wiki
Context7

Getting Started

This is an addon for the Streams Platform (formerly PyroCMS), not a vanilla Laravel package. If your project isn't on anomaly/streams-platform, there's no meaningful integration path — stop here and roll your own sitemap controller instead.

Assuming you are on Streams:

  1. Install the module it extends first: composer require anomaly/sitemap-module.
  2. Install the extension: composer require anomaly/sitemap-extension.
  3. Register the addon in config/streams.php (or config/addons.php) — the extension will not boot unless it's listed there.
  4. Run php artisan addon:install anomaly/sitemap-extension so migrations and publishables run.
  5. Confirm the route with php artisan route:list | grep -i sitemap.

Where to look first: the extension's SitemapExtensionServiceProvider, its routes/web.php, and any config/views it publishes. That defines the whole contract — there is very little else to read.

First use case: serve /sitemap.xml for the site's page stream plus module entries (blog posts, products, etc.), and reference it from robots.txt.

Implementation Patterns

  • Register sources, don't edit the package. Pull your URLs from the Sitemap module's entry-collection service inside a project-level service provider. Keep customisations out of vendor/.
  • Respect publishing state. When querying Streams repositories, filter on enabled, publish_at <= now, and non-empty slug — the extension will happily emit draft or future-dated URLs otherwise.
  • Cache aggressively. Regeneration on every request is the default failure mode. Wrap output in Cache::remember(...) and invalidate on EntryWasSaved/EntryWasDeleted events, or simply on a nightly schedule.
  • Multi-site/locale. Scope entries by the current Streams Application/locale binding; without it you'll leak URLs across sites.
  • Override views and config by publishing, then placing them under resources/views/vendor/ and config/. This survives package updates and is the intended extension point.
  • Warm the cache on a schedule in app/Console/Kernel.php so the first crawl of the day isn't slow.
  • Custom URL types not covered by the extension: add your own entry source to the module's sitemap service rather than patching the extension.

Gotchas and Tips

  • This package is effectively unmaintained (0 stars, 0 dependents). Pin an exact version in composer.json, verify compatibility with the installed Sitemap module version, and be prepared to fork for bugfixes.
  • A "missing route" is almost always an addon registration problem, not a routing bug — re-check config/streams.php and run php artisan addon:install again.
  • Namespace is Anomaly\SitemapExtension\. If classes aren't found, run composer dump-autoload -o before debugging anything else.
  • XML escaping: test titles containing &, <, and quotes. The module usually sanitises, but not always end-to-end.
  • Sorting and filtering are your responsibility at the source; don't assume the extension applies canonical or priority logic for you.
  • Debugging order: php artisan route:list → storage/logs/laravel.log for boot errors → php artisan stream:compile after schema changes.
  • Extension points to prefer: publishable config/views, the module's entry-collection bindings, and Laravel model events — in that order — over subclassing the extension itself.
  • Keep robots.txt's Sitemap: line and Search Console verification aligned with the actual route and hostname you generate.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource