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

1.4.10(9mo ago)6155.8k↓41.9%11MITPHPPHP ^7.1|^8.0

Since Oct 27Pushed 9mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (29)Used By (0)

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

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

[![Statamic 3](https://camo.githubusercontent.com/af313bf01664e6fd10689ada5b8b1c0b3372828a65f8308719e758c1edf0c7e1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4444393832363f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/af313bf01664e6fd10689ada5b8b1c0b3372828a65f8308719e758c1edf0c7e1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4444393832363f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Statamic 4](https://camo.githubusercontent.com/80c8b75f9d18495369cb4dae211272a6b161e0413eb2db610c81757e13d758c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d342e302b2d3932433831423f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/80c8b75f9d18495369cb4dae211272a6b161e0413eb2db610c81757e13d758c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d342e302b2d3932433831423f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![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)

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 7.3+ or PHP 8+. 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
- **changefreq**: A string like 'daily', 'weekly' (optional)
- **priority**: A string presenting a float value between 0 and 1 (optional)

### 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

50

—

FairBetter than 95% of packages

Maintenance58

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity70

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 ~69 days

Recently: every ~212 days

Total

27

Last Release

276d ago

PHP version history (5 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

### 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

### 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

68516.6k](/packages/statamic-seo-pro)[mitydigital/sitemapamic

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

1499.3k](/packages/mitydigital-sitemapamic)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k15](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

15133.0k](/packages/withcandour-aardvark-seo)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2915.1k](/packages/aerni-livewire-forms)[mitydigital/feedamic

A fully-featured RSS and Atom feed generator for Statamic.

1075.6k](/packages/mitydigital-feedamic)

PHPackages © 2026

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