PHPackages                             winter/wn-sitemap-plugin - 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. winter/wn-sitemap-plugin

ActiveWinter-plugin[Utility &amp; Helpers](/categories/utility)

winter/wn-sitemap-plugin
========================

Sitemap plugin for Winter CMS

v2.2.2(10mo ago)1049.0k↓42.4%8[3 issues](https://github.com/wintercms/wn-sitemap-plugin/issues)1MITPHPPHP &gt;=8.1

Since May 18Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/wintercms/wn-sitemap-plugin)[ Packagist](https://packagist.org/packages/winter/wn-sitemap-plugin)[ Docs](https://github.com/wintercms/wn-sitemap-plugin)[ GitHub Sponsors](https://github.com/wintercms)[ Fund](https://opencollective.com/wintercms)[ RSS](/packages/winter-wn-sitemap-plugin/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (1)

Sitemap Plugin
==============

[](#sitemap-plugin)

Dynamically generates `sitemap.xml` files in Winter CMS based user-configured settings.

Supports:

- Single sitemap definition per theme
- Sitemaps are automatically styled for human consumption using the default `sitemap.xsl` file.
- Supports item types as registered by [Winter.Pages](https://github.com/wintercms/wn-pages-plugin) and compatible plugins (Static URL, CMS Page, Single Record, All Records in type, etc)
- Supports custom sitemap item types

Installation
------------

[](#installation)

This plugin is available for installation via [Composer](http://getcomposer.org/).

```
composer require winter/wn-sitemap-plugin
```

After installing the plugin you will need to run the migrations and (if you are using a [public folder](https://wintercms.com/docs/develop/docs/setup/configuration#using-a-public-folder)) [republish your public directory](https://wintercms.com/docs/develop/docs/console/setup-maintenance#mirror-public-files).

```
php artisan migrate
```

Viewing the sitemap
-------------------

[](#viewing-the-sitemap)

Once this plugin is installed and the sitemap has been configured. The sitemap can be viewed by accessing the file relative to the website base path. For example, if the website is hosted at  it can be viewed by opening this URL:

```
https://wintercms.com/sitemap.xml

```

Managing a sitemap definition
-----------------------------

[](#managing-a-sitemap-definition)

The sitemap is managed by selecting Sitemap from the Settings area of the back-end. There is a single sitemap definition for each theme and it will be created automatically.

A sitemap definition can contain multiple items and each item has a number of properties. There are common properties for all item types, and some properties depend on the item type. The common item properties are **Priority** and **Change frequency**. The Priority defines the priority of this item relative to other items in the sitemap. The Change frequency defines how frequently the page is likely to change.

#### Standard item types

[](#standard-item-types)

The available item types depend on the installed plugins, but there are three basic item types that are supported out of the box.

###### URL {.subheader}

[](#url-subheader)

Items of this type are links to a specific fixed URL. That could be an URL of an or internal page. Items of this type don't have any other properties - just the title and URL.

###### Static page {.subheader}

[](#static-page-subheader)

Items of this type refer to static pages. The static page should be selected in the **Reference** drop-down list described below.

###### All static pages {.subheader}

[](#all-static-pages-subheader)

Items of this type expand to create links to all static pages defined in the theme.

#### Custom item types

[](#custom-item-types)

Other plugins can supply new item types. For example, the [Blog plugin](https://github.com/wintercms/wn-blog-plugin) supplies two more types:

###### Blog category {.subheader}

[](#blog-category-subheader)

An item of this type represents a link to a specific blog category. The category should be selected in the **Reference** drop-down. This type also requires selecting a **CMS page** that outputs a blog category.

###### All blog categories {.subheader}

[](#all-blog-categories-subheader)

An item of this time expands into multiple items representing all blog existing categories. This type also requires selecting a **CMS page**.

#### Definition item properties

[](#definition-item-properties)

Depending on the selected item time you might need to provide other properties of the item. The available properties are described below.

###### Reference {.subheader}

[](#reference-subheader)

A drop-down list of objects the item should refer to. The list content depends on the item type. For the **Static page** item type the list displays all static pages defined in the system. For the **Blog category** item type the list displays a list of blog categories.

###### Allow nested items {.subheader}

[](#allow-nested-items-subheader)

This checkbox is available only for item types that suppose nested objects. For example, static pages are hierarchical, and this property is available for the **Static page** item type. On the other hand, blog categories are not hierarchical, and the checkbox is hidden.

###### CMS Page {.subheader}

[](#cms-page-subheader)

This drop-down is available for item types that require a special CMS page to refer to. For example, the **Blog category** item type requires a CMS page that hosts the `blogPosts` component. The CMS Page drop-down for this item type will only display pages that include this component.

---

The Sitemap plugin works *out of the box* and does not require any direct development to operate.

##### Registering new sitemap definition item types

[](#registering-new-sitemap-definition-item-types)

The Sitemap plugin shares the same events for registering item types as the [Pages plugin](https://github.com/wintercms/wn-pages-plugin). See the documentation provided by this plugin for more information.

A small addition is required when resolving items, via the following event:

- `pages.menuitem.resolveItem` event handler "resolves" a menu item information and returns the actual item URL, title, an indicator whether the item is currently active, and subitems, if any.

##### Resolving items

[](#resolving-items)

When resolving an item, each item should return an extra key in the array called `mtime`. This should be a Date object (see `Carbon\Carbon`) or a timestamp value compatible with PHP's `date()` function and represent the last time the link was modified.

Expected result format:

```
Array (
    [url] => https://example.com/blog/category/another-category
    [mtime] => Carbon::now(),
    [items] => Array (
        [0] => Array (
            [url] => https://example.com/blog/category/another-category
            [mtime] => Carbon::now(),
        )

        [1] => Array (
            [url] => https://example.com/blog/category/news
            [mtime] => Carbon::now(),
        )
    )
)

```

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance70

Regular maintenance activity

Popularity38

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~218 days

Total

7

Last Release

300d ago

Major Versions

v1.0.9 → v2.0.02021-04-22

PHP version history (3 changes)v1.0.9PHP &gt;=5.5.9

v2.0.0PHP &gt;=7.2

v2.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7253840?v=4)[Luke Towers](/maintainers/LukeTowers)[@LukeTowers](https://github.com/LukeTowers)

---

Top Contributors

[![daftspunk](https://avatars.githubusercontent.com/u/1392869?v=4)](https://github.com/daftspunk "daftspunk (49 commits)")[![mjauvin](https://avatars.githubusercontent.com/u/2013630?v=4)](https://github.com/mjauvin "mjauvin (36 commits)")[![gergo85](https://avatars.githubusercontent.com/u/2959112?v=4)](https://github.com/gergo85 "gergo85 (21 commits)")[![LukeTowers](https://avatars.githubusercontent.com/u/7253840?v=4)](https://github.com/LukeTowers "LukeTowers (21 commits)")[![zek](https://avatars.githubusercontent.com/u/3463291?v=4)](https://github.com/zek "zek (8 commits)")[![matteotrubini](https://avatars.githubusercontent.com/u/7964032?v=4)](https://github.com/matteotrubini "matteotrubini (3 commits)")[![acasar](https://avatars.githubusercontent.com/u/6329543?v=4)](https://github.com/acasar "acasar (2 commits)")[![bennothommo](https://avatars.githubusercontent.com/u/15900351?v=4)](https://github.com/bennothommo "bennothommo (2 commits)")[![mohsin](https://avatars.githubusercontent.com/u/1699753?v=4)](https://github.com/mohsin "mohsin (2 commits)")[![RomainMazB](https://avatars.githubusercontent.com/u/53976837?v=4)](https://github.com/RomainMazB "RomainMazB (2 commits)")[![Samuell1](https://avatars.githubusercontent.com/u/3110002?v=4)](https://github.com/Samuell1 "Samuell1 (2 commits)")[![vojtasvoboda](https://avatars.githubusercontent.com/u/374917?v=4)](https://github.com/vojtasvoboda "vojtasvoboda (2 commits)")[![MatissJanis](https://avatars.githubusercontent.com/u/886567?v=4)](https://github.com/MatissJanis "MatissJanis (1 commits)")[![emzet](https://avatars.githubusercontent.com/u/5151119?v=4)](https://github.com/emzet "emzet (1 commits)")[![diraulo](https://avatars.githubusercontent.com/u/4028374?v=4)](https://github.com/diraulo "diraulo (1 commits)")[![BlazOrazem](https://avatars.githubusercontent.com/u/5699173?v=4)](https://github.com/BlazOrazem "BlazOrazem (1 commits)")[![Mr118](https://avatars.githubusercontent.com/u/9792509?v=4)](https://github.com/Mr118 "Mr118 (1 commits)")[![raank](https://avatars.githubusercontent.com/u/5004866?v=4)](https://github.com/raank "raank (1 commits)")[![ribsousa](https://avatars.githubusercontent.com/u/2750974?v=4)](https://github.com/ribsousa "ribsousa (1 commits)")[![TheServat](https://avatars.githubusercontent.com/u/12908537?v=4)](https://github.com/TheServat "TheServat (1 commits)")

---

Tags

hacktoberfestpluginsitemapwintercmsplugincmsSitemapwinterwinter cms

### Embed Badge

![Health badge](/badges/winter-wn-sitemap-plugin/health.svg)

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[winter/wn-blog-plugin

Blog plugin for Winter CMS

2046.4k3](/packages/winter-wn-blog-plugin)[winter/wn-pages-plugin

Pages plugin for Winter CMS

1459.8k3](/packages/winter-wn-pages-plugin)[winter/wn-user-plugin

User plugin for Winter CMS

1338.6k17](/packages/winter-wn-user-plugin)

PHPackages © 2026

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