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

1.0.0 2025-11-06 15:10 UTC

This package is auto-updated.

Last update: 2025-11-06 15:23:23 UTC


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();