PHPackages                             trntv/sitemaped - 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. trntv/sitemaped

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

trntv/sitemaped
===============

PHP Sitemap abstraction library

1.0.2(7y ago)261.2k↓34.2%8[2 issues](https://github.com/trntv/sitemaped/issues)2MITPHPPHP ^7.1

Since May 6Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (7)Used By (2)

PHP Sitemap abstraction library
===============================

[](#php-sitemap-abstraction-library)

---

1. Add urls one-by-one

    ```
    $urlset = new Urlset($links);

    foreach(range('a', 'z') as $letter) {
             $url = new Url(
                 'https://vocabula.ry/'.$letter,
                 new \DateTime('2017-01-01 00:00:01'),
                 Url::CHANGEFREQ_MONTHLY,
                 0.8
             );

             $url->addImage(new Image('https://test.com/image/'.$i));
             $url->addVideo(new Video('https://test.com/video/'.$i, 'Title '.$i, 'Description '.$i));
             $url->addNews(new News('Awesome news '.$i, '2018-01-01', 'Awesome news name '.$i, 'ru-RU'));

             $urlset->addUrl($url);
         }

    $sitemap = new Sitemap($urlset);

    $sitemap->toXmlString();
    $sitemap->toTxtString();
    $sitemap->write(__DIR__ . '/sitemap.xml');
    $sitemap->write(__DIR__ . '/sitemap.txt', Sitemap::FORMAT_TXT);
    ```
2. Using links generator

    ```
    $links = function() {
         foreach(range('a', 'z') as $letter) {
             $url = new Url(
                 'https://vocabula.ry/'.$letter,
                 new \DateTime('2017-01-01 00:00:01'),
                 Url::CHANGEFREQ_MONTHLY,
                 0.8
             );

             $url->addImage(new Image('https://test.com/image/'.$i));
             $url->addVideo(new Video('https://test.com/video/'.$i, 'Title '.$i, 'Description '.$i));
             $url->addNews(new News('Awesome news '.$i, '2018-01-01', 'Awesome news name '.$i, 'ru-RU'));

             yield $url;
         }
    }

    $urlset = new Urlset($links);
    $sitemap = new Sitemap($urlset);

    $sitemap->toXmlString();
    $sitemap->toTxtString();
    $sitemap->write(__DIR__ . '/sitemap.xml');
    $sitemap->write(__DIR__ . '/sitemap.txt', Sitemap::FORMAT_TXT);
    ```
3. Sitemap index

    ```
    $index = new Sitemapindex();
    $sitemap = new Sitemap($index);

    foreach (range(1, 2) as $i) {
        $sitemap = new SitemapindexSitemap(
            'http://test.com/'.$i,
           '-1 year'
        );
        $index->addSitemap($sitemap);
    }

    $content = $sitemap->toXmlString();
    ```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~53 days

Total

6

Last Release

2722d ago

Major Versions

0.1.2 → 1.0.02018-12-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a67acd28d366ff328006f3e62c314993301a3742af6dbf0da18693cda04c9c6?d=identicon)[trntv](/maintainers/trntv)

---

Tags

phpsitemapsitemap-buildersitemap-generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/trntv-sitemaped/health.svg)

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

###  Alternatives

[teguh02/indonesia-territory-forms

Display a Indonesia Territory Select Form For Filament Within the Zip-Code Without Any Seeder Needed

161.1k](/packages/teguh02-indonesia-territory-forms)

PHPackages © 2026

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