PHPackages                             jeroendesloovere/sitemap-bundle - 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-bundle

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

jeroendesloovere/sitemap-bundle
===============================

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

2.0.4(1y ago)211.8k2[3 issues](https://github.com/jeroendesloovere/sitemap-bundle/issues)[1 PRs](https://github.com/jeroendesloovere/sitemap-bundle/pulls)MITPHPPHP ^7.4||^8.0

Since Jul 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/jeroendesloovere/sitemap-bundle)[ Packagist](https://packagist.org/packages/jeroendesloovere/sitemap-bundle)[ Docs](https://github.com/jeroendesloovere/sitemap-bundle)[ RSS](/packages/jeroendesloovere-sitemap-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (19)Used By (0)

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

[](#sitemap-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/331a44b855fc3221c7793abb89bcbd914ecc0487b8626cbe35842f1c039d0708/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f656e6465736c6f6f766572652f736974656d61702d62756e646c652f762f737461626c65)](https://packagist.org/packages/jeroendesloovere/sitemap-bundle)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/jeroendesloovere/sitemap-bundle/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/ebab848da6aba659f7e6a82f7128f32313d7d493c246d77fbf546959a517e8b0/68747470733a2f2f7472617669732d63692e6f72672f6a65726f656e6465736c6f6f766572652f736974656d61702d62756e646c652e737667)](https://travis-ci.org/jeroendesloovere/sitemap-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a71967b743adeb6607ad97b867e8c73a7f62c864889f2407814ad752bab8ad14/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a65726f656e6465736c6f6f766572652f736974656d61702d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/jeroendesloovere/sitemap-bundle/)

> 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-bundle
```

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

```
