kenshodigital / kirby-sitemap
Adds an XML sitemap to Kirby projects.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:kirby-plugin
pkg:composer/kenshodigital/kirby-sitemap
Requires
- php: ^8.4
- getkirby/cms: ^5.1
- getkirby/composer-installer: ^1.2
README
Adds an XML sitemap to Kirby projects.
General
The plugin adds a /sitemap.xml route and returns an XML sitemap, following Google’s best practices for multilingual sites.
Installation
composer require kenshodigital/kirby-sitemap ^1.0
Usage
Out of the box, the sitemap includes all listed pages via a sitemap collection. This can be easily customized with your own collection, though.
<?php declare(strict_types=1); use Kirby\Cms\Pages; use Kirby\Cms\Site; return fn(Site $site): Pages => $site ->index() ->template(templates: ["home", "about", "contact", "product", "article"]) ->listed();