PHPackages                             jeroendesloovere/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jeroendesloovere/sitemap

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

jeroendesloovere/sitemap
========================

Library for generating (one or multiple) Sitemaps and a SitemapIndex.

1.0.1(4y ago)15.8kMITPHPPHP &gt;=7.1

Since Mar 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jeroendesloovere/sitemap)[ Packagist](https://packagist.org/packages/jeroendesloovere/sitemap)[ Docs](https://github.com/jeroendesloovere/sitemap)[ RSS](/packages/jeroendesloovere-sitemap/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Sitemap bundle
==============

[](#sitemap-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/d30f8dc09e3a731c729fbea8e5fe00a65a3a3bf9ee0dec62bc3183e57138c5bf/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f656e6465736c6f6f766572652f736974656d61702f762f737461626c65)](https://packagist.org/packages/jeroendesloovere/sitemap)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/jeroendesloovere/sitemap/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/4d1a89dea2139f9572c7b0396ee58feeebea5f4aa6424ee698832a89cee94a6b/68747470733a2f2f7472617669732d63692e6f72672f6a65726f656e6465736c6f6f766572652f736974656d61702e737667)](https://travis-ci.org/jeroendesloovere/sitemap)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2b2ddc79ff0116911032202368301c693ad5b61ddc80b32b92f168993c09a449/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a65726f656e6465736c6f6f766572652f736974656d61702f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/jeroendesloovere/sitemap/)

> This Symfony bundle allows you to easily generate a sitemapindex and one or multiple sitemap(s).

To Do Features
--------------

[](#to-do-features)

What needs to be done:

- Generate the "sitemap provider last modified on datetime" which we need to show in the sitemapindex.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require jeroendesloovere/sitemap
```

### Example: "How to create your custom sitemap?"

[](#example-how-to-create-your-custom-sitemap)

We need to notify Symfony that we have a new sitemap provider. Add the following somewhere in your `services.yaml`

```
services:
    App\SitemapProviders\NewsArticleSitemapProvider:
        tags:
            - { name: sitemap.provider }
```

When the `SitemapGenerator` needs to generate the sitemap(s), it will ask all SitemapProviders to fill in the items. Create something like the following in your app.

```
