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

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

baraja-core/sitemap
===================

v2.0.2(4y ago)111.0kPHPPHP ^8.0

Since Sep 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/baraja-core/sitemap)[ Packagist](https://packagist.org/packages/baraja-core/sitemap)[ Docs](https://github.com/baraja-core/sitemap)[ RSS](/packages/baraja-core-sitemap/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (11)Versions (14)Used By (0)

Sitemap generator
=================

[](#sitemap-generator)

[![Integrity check](https://github.com/baraja-core/sitemap/workflows/Integrity%20check/badge.svg)](https://github.com/baraja-core/sitemap/workflows/Integrity%20check/badge.svg)

Simple sitemap generator with robust and performance implementation.

- Generates a standardized site map in XML format,
- Allows custom implementation of UrlLoader and specification of custom link sources,
- The generated map is automatically cached and updated without the need to use cron.

📦 Installation
--------------

[](#-installation)

It's best to use [Composer](https://getcomposer.org) for installation, and you can also find the package on [Packagist](https://packagist.org/packages/baraja-core/sitemap) and [GitHub](https://github.com/baraja-core/sitemap).

To install, simply use the command:

```
$ composer require baraja-core/sitemap
```

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

Basic description
-----------------

[](#basic-description)

The package automatically generates a site map as a `sitemap.xml` file with the following structure:

```

            https://... // Here will be the whole absolute path

        weekly
        0.5

```

URLs are retrieved from the abstract `SitemapUrlLoader` service, which can be overloaded and otherwise implemented. UrlLoader returns the entity field `SitemapItems[]` with the `getUrls()` method.

It adds its own presenter to the administration, which shows the current form and structure of the file.

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

[](#installation)

Composer:

```
$ composer require baraja-core/sitemap

```

The routing rule and services are registered automatically.

After installation, you must define an UrlLoader in the package, which gets a list of all available URLs and passes it on for rendering. You can use another existing library as the UrlLoader.

Getting a list of URLs
----------------------

[](#getting-a-list-of-urls)

The package does not include the default implementation of UrlLoader, and each project must implement it itself.

The class must contain a public `getUrls()` method that returns an array of `SitemapItem[]` instances.

Getting sitemap + cache
-----------------------

[](#getting-sitemap--cache)

The package does not create any physical sitemap file, because it runs a PHP script with each request. In order not to always have to perform complex mapping, the package itself will use a cache with a default validity of 5 minutes.

The cache length setting can be affected by the `neon` configuration file:

```
sitemap:
    cacheExpirationTime: '20 minutes'
```

📄 License
---------

[](#-license)

`baraja-core/sitemap` is licensed under the MIT license. See the [LICENSE](https://github.com/baraja-core/sitemap/blob/master/LICENSE) file for more details.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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 ~50 days

Recently: every ~82 days

Total

10

Last Release

1602d ago

Major Versions

v1.2.0 → v2.0.02021-02-11

PHP version history (4 changes)v1.0.0PHP &gt;=7.1.0

v1.0.1PHP &gt;=7.4.0

v1.2.0PHP ^7.4 || ^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3382204?v=4)[baraja](/maintainers/baraja)[@baraja](https://github.com/baraja)

---

Top Contributors

[![janbarasek](https://avatars.githubusercontent.com/u/4738758?v=4)](https://github.com/janbarasek "janbarasek (40 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

robustsitemapsitemap-generatorsitemap-xmlurlloader

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)[uestla/twigrid

Experimental DataGrid for Nette Framework

1712.3k2](/packages/uestla-twigrid)[ipub/gravatar

Gravatar creator for Nette Framework

122.0k1](/packages/ipub-gravatar)

PHPackages © 2026

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