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

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

nepttune/sitemap
================

Component for Nette framework which renders as xml sitemap.

v2.0.1(7y ago)35.6k↑2900%1[1 issues](https://github.com/infinityloop-dev/sitemap/issues)1MITPHP

Since Apr 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/infinityloop-dev/sitemap)[ Packagist](https://packagist.org/packages/nepttune/sitemap)[ Docs](https://www.peldax.com)[ RSS](/packages/nepttune-sitemap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (1)

Sitemap
=======

[](#sitemap)

🔧 Sitemap generator component

Introduction
------------

[](#introduction)

This componenet automaticaly generates sitemap from annotated presenter actions. Found actions are cached to improve performance.

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

[](#installation)

Install package using composer

```
composer require nepttune/sitemap

```

Dependencies
------------

[](#dependencies)

- [nette/application](https://github.com/nette/application)
- [nette/di](https://github.com/nette/di)
- [nette/caching](https://github.com/nette/caching)

How to use
----------

[](#how-to-use)

- Implement `\Nepttune\TI\ISitemap` interface and use `\Nepttune\TI\TSitemap` trait in selected presenters (Those which should have links in sitemap.).
- Add annotation `@sitemap` to selected actions.
- Register `\Nepttune\Component\ISitemapFactory` as service in cofiguration file.
- Inject it into eg. SitemapPresenter, write `createComponent` method and use macro `{control}` in template file.
    - Just as any other component.
    - Content type is automaticaly set to `application/xml`.

### Example configuration

[](#example-configuration)

```
services:
    - Nepttune\Component\ISitemapFactory

```

You can optionaly provide configuration array and enable hreflang links to be included for each entry (Requires translator in presenter).

```
parameters:
    sitemap:
        hreflang: true

services:
    sitemapFactory:
            implement: Nepttune\Component\ISitemapFactory
            arguments:
                - '%sitemap%'

```

### Example presenter

[](#example-presenter)

```
class ExamplePresenter implements IPresenter, ISitemap
{
    use TSitemap;

    /** @var  \Nepttune\Component\ISitemapFactory */
    protected $iSitemapFactory;

    public function __construct(\Nepttune\Component\ISitemapFactory $ISitemapFactory)
    {
        $this->iSitemapFactory = $ISitemapFactory;
    }

    public function actionSitemap()
    {
        $this->getHttpResponse()->setContentType('application/xml');
    }

    /**
     * @sitemap
     */
    public function actionExample()
    {
    }

    protected function createComponentSitemap()
    {
        return $this->iSitemapFactory->create();
    }
}

```

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

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

Recently: every ~91 days

Total

12

Last Release

2570d ago

Major Versions

v1.3 → v2.02019-04-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/00654c913028f8d25a226eb2ddf368e1b999bf72fa4f77dbd1449c1df218756c?d=identicon)[peldax](/maintainers/peldax)

---

Top Contributors

[![peldax](https://avatars.githubusercontent.com/u/10790033?v=4)](https://github.com/peldax "peldax (49 commits)")

---

Tags

componentnettenette-componentphpsitemap

### Embed Badge

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

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

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[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)

PHPackages © 2026

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