PHPackages                             webit/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. webit/sitemap

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webit/sitemap
=============

Web-IT Sitemap Lib

2.0.0(6y ago)01221MITPHPPHP &gt;=5.6.0

Since Jan 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/dbojdo/sitemap)[ Packagist](https://packagist.org/packages/webit/sitemap)[ Docs](http://www.web-it.eu)[ RSS](/packages/webit-sitemap/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (5)Used By (1)

Web-IT Site Map Generator
=========================

[](#web-it-site-map-generator)

This library provides components to generate ***sitemap.xml*** file according to

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

[](#installation)

### Composer: add the **webit/sitemap** into **composer.json**

[](#composer-add-the-webitsitemap-into-composerjson)

```
{
    "require": {
        "php": ">=5.6.0",
        "webit/sitemap": "^2.0.0"
    }
}
```

Usage
-----

[](#usage)

Prepare your implementation of a ***\\Webit\\Sitemap\\Exposer\\UrlExposerInterface***. Its method **getUrlSet** must return instance of a ***\\Webit\\Sitemap\\UrlSet*** object (which is a container for ***\\Webit\\Sitemap\\Url*** objects).

```
namespace MyProject;

use Webit\Sitemap\Exposer\UrlExposerInterface;
use Webit\Sitemap\UrlSet;
use Webit\Sitemap\Url;

class MyExposer implements UrlExposerInterface
{
    /**
     * @return UrlSet
     */
    public function getUrlSet()
    {
        $urlSet = new UrlSet();

        $urlSet->addUrl(Url::create('http://my-project.domain/url-1'));
        $urlSet->addUrl(Url::create('http://my-project.domain/url-2'));
        $urlSet->addUrl(Url::create('http://my-project.domain/url-3'));
        // add urls you need

        return $urlSet;
    }
}
```

Configure a ***SitemapProvider*** and generate a Site Map

```
use Webit\Sitemap\Writer\SerializerUrlSetWriter;
use Webit\Sitemap\Provider\SitemapProvider;

/** @var \JMS\Serializer\SerializerInterface $serializer **/

$writer = new SerializerUrlSetWriter($serializer, sys_get_temp_dir());

$exposer = new MyProject\MyExposer();

$provider = new SitemapProvider($exposer, $writer, 7, '/dir/inside/your/project/can/be/webroot');

/**
 * Generate XML file (\SplFileInfo instance)
 */
$sitemapFile = $provider->getSitemap();

// if you need to force regeneration use
$sitemapFile = $provider->getSitemap(true);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~242 days

Total

4

Last Release

2349d ago

Major Versions

0.11.x-dev → 1.0.02019-02-20

1.x-dev → 2.0.02020-01-24

PHP version history (2 changes)0.11.x-devPHP &gt;=5.3.2

2.0.0PHP &gt;=5.6.0

### Community

Maintainers

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

---

Top Contributors

[![dbojdo](https://avatars.githubusercontent.com/u/1272416?v=4)](https://github.com/dbojdo "dbojdo (12 commits)")

---

Tags

Sitemap

### Embed Badge

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

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

###  Alternatives

[samdark/sitemap

Sitemap and sitemap index builder

5401.4M43](/packages/samdark-sitemap)[tackk/cartographer

A PHP sitemap generation tool.

325492.4k3](/packages/tackk-cartographer)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M52](/packages/nystudio107-craft-seomatic)[novactive/ezseobundle

Novactive eZ SEO Bundle is an Ibexa Platform bundle for SEO simplications. metas, sitemaps, robots.txt, etc.

26256.6k3](/packages/novactive-ezseobundle)[rainlab/sitemap-plugin

Sitemap plugin for October CMS

2280.9k1](/packages/rainlab-sitemap-plugin)[fof/sitemap

Generate a sitemap

1796.4k2](/packages/fof-sitemap)

PHPackages © 2026

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