PHPackages                             pecotamic/sitemap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pecotamic/sitemap

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

pecotamic/sitemap
=================

Simple sitemap addon for Statamic

2.0.0(2w ago)6159.6k↓39.2%11MITPHPPHP ^8.2

Since Oct 27Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/pecotamic/sitemap)[ Packagist](https://packagist.org/packages/pecotamic/sitemap)[ RSS](/packages/pecotamic-sitemap/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (30)Used By (0)

Sitemap Addon for Statamic
==========================

[](#sitemap-addon-for-statamic)

[![Statamic 5](https://camo.githubusercontent.com/735aa648b49fd4a97d6436292bff62c713d1c701136d7018c1da3509450f0f1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e302b2d3236424244443f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/735aa648b49fd4a97d6436292bff62c713d1c701136d7018c1da3509450f0f1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e302b2d3236424244443f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Statamic 6](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/e2d97a60f0486aada69d7bf68516cff0f0ed6d2ad2f935e8dc54767eefb3295d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d362e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)

[![Tests](https://github.com/pecotamic/sitemap/actions/workflows/tests.yml/badge.svg)](https://github.com/pecotamic/sitemap/actions/workflows/tests.yml)

Automatically adds a sitemap to your Statamic web site. The default path is &lt;your web site&gt;/sitemap.xml

How to Install
--------------

[](#how-to-install)

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

```
composer require pecotamic/sitemap
```

The package requires PHP 8.2+. It will auto register.

Configuration (optional)
------------------------

[](#configuration-optional)

You can override the default options by publishing the configuration:

```
php artisan vendor:publish --provider="Pecotamic\Sitemap\ServiceProvider" --tag=config

```

This will copy the default config file to `config/pecotamic/sitemap.php`.

### View (optional)

[](#view-optional)

You can also override the view template to adjust the output by publishing the view:

```
php artisan vendor:publish --provider="Pecotamic\Sitemap\ServiceProvider" --tag=view

```

The view template will be copied to `resources/views/vendor/pecotamic/sitemap/sitemap.blade.php`.

If you prefer another view engine, it is also possible. For example to use Antlers, create a file named `sitemap.antlers.html` instead of the blade template.

#### View variables

[](#view-variables)

An array of sitemap **entries** is passed to the view template. Each **entry** has these properties:

- **loc**: The absolute url
- **path**: The relative path
- **lastmod**: A `DateTime` object of the last modification date, or `null`
- **changefreq**: A string like 'daily', 'weekly' (optional)
- **priority**: A float value between 0 and 1 (defaults to 1.0 for the root path, 0.8 otherwise)

### Dynamically adding entries (optional)

[](#dynamically-adding-entries-optional)

You may add entries dynamically by providing a closure that returns an array to the `addEntries` method.

```
use Pecotamic\Sitemap\Sitemap;
use Pecotamic\Sitemap\SitemapEntry;

class AppServiceProvider extends Provider
{
    public function boot()
    {
        Sitemap::addEntries(static function () {
            return [
                new SitemapEntry('/hidden-page', new \DateTime('2020-02-20')),
                new SitemapEntry('/about-me', new \DateTime('now'), 'daily', 1.0),
            ];
        });
    }
}
```

Credits
-------

[](#credits)

Thanks for code contribution to [Prageeth Silva](/prageeth), [Poh Nean](/pohnean) and [Frederik Sauer](/FrittenKeeZ).

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance72

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 88.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~77 days

Recently: every ~202 days

Total

28

Last Release

20d ago

Major Versions

1.4.10 → 2.0.02026-07-28

PHP version history (6 changes)1.0PHP ^7.3.4

1.0.2PHP ^5.3.2 || ^7.0 || ^8.0

1.1.0PHP ^5.4 || ^7.0 || ^8.0

1.4.2PHP ^5.4|^7.0|^8.0

1.4.7PHP ^7.1|^8.0

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc0f3bb11948077e1d221b6999d4f522b63fa249af847ff58800c2a618dbd0f9?d=identicon)[pecotamic](/maintainers/pecotamic)

---

Top Contributors

[![werner-freytag](https://avatars.githubusercontent.com/u/3309376?v=4)](https://github.com/werner-freytag "werner-freytag (69 commits)")[![prageeth](https://avatars.githubusercontent.com/u/230793?v=4)](https://github.com/prageeth "prageeth (4 commits)")[![FrittenKeeZ](https://avatars.githubusercontent.com/u/1186125?v=4)](https://github.com/FrittenKeeZ "FrittenKeeZ (3 commits)")[![joshuablum](https://avatars.githubusercontent.com/u/3824203?v=4)](https://github.com/joshuablum "joshuablum (1 commits)")[![pohnean](https://avatars.githubusercontent.com/u/846343?v=4)](https://github.com/pohnean "pohnean (1 commits)")

---

Tags

Sitemapstatamic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pecotamic-sitemap/health.svg)

```
[![Health](https://phpackages.com/badges/pecotamic-sitemap/health.svg)](https://phpackages.com/packages/pecotamic-sitemap)
```

###  Alternatives

[statamic/seo-pro

71548.3k](/packages/statamic-seo-pro)[statamic/statamic

Statamic

832182.1k](/packages/statamic-statamic)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

137236.2k8](/packages/statamic-rad-pack-runway)[mitydigital/sitemapamic

An XML sitemap generator for Statamic that includes all collections and related taxonomy pages.

15105.1k](/packages/mitydigital-sitemapamic)[rias/statamic-redirect

29347.4k](/packages/rias-statamic-redirect)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
