PHPackages                             skywalker-labs/sitemapper - 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. skywalker-labs/sitemapper

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

skywalker-labs/sitemapper
=========================

A powerful, framework-agnostic Sitemap generator for PHP, Laravel, and Symfony. Create XML, HTML, and Google News sitemaps easily to boost your SEO.

v0.0.1(1mo ago)11MITPHPPHP &gt;=8.2CI passing

Since Jul 11Pushed 1mo agoCompare

[ Source](https://github.com/skywalker-labs/sitemapper)[ Packagist](https://packagist.org/packages/skywalker-labs/sitemapper)[ Docs](https://github.com/skywalker-labs/sitemapper)[ GitHub Sponsors](https://github.com/sponsors/skywalker-labs)[ RSS](/packages/skywalker-labs-sitemapper/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

 [![Sitemapper Banner](assets/banner.png)](assets/banner.png)

[![CI](https://github.com/skywalker-labs/sitemapper/actions/workflows/ci.yml/badge.svg)](https://github.com/skywalker-labs/sitemapper/actions/workflows/ci.yml)[![Analyze](https://github.com/skywalker-labs/sitemapper/actions/workflows/analyze.yml/badge.svg)](https://github.com/skywalker-labs/sitemapper/actions/workflows/analyze.yml)[![Style](https://github.com/skywalker-labs/sitemapper/actions/workflows/style.yml/badge.svg)](https://github.com/skywalker-labs/sitemapper/actions/workflows/style.yml)[![CodeQL](https://github.com/skywalker-labs/sitemapper/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/skywalker-labs/sitemapper/actions/workflows/github-code-scanning/codeql)[![Dependabot](https://github.com/skywalker-labs/sitemapper/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/skywalker-labs/sitemapper/actions/workflows/dependabot/dependabot-updates)[![codecov](https://camo.githubusercontent.com/dda89a29f8e1ddf9a7094b1e65f350b18b1820ec5166472d5299bdbc7f330839/68747470733a2f2f636f6465636f762e696f2f67682f736b7977616c6b65722d6c6162732f736974656d61707065722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/skywalker-labs/sitemapper)

> **Sitemapper** is a modern, framework-agnostic PHP package for generating sitemaps in XML, TXT, HTML, and Google News formats. It works seamlessly with Laravel, Symfony, or any PHP project. Features include high test coverage, robust CI, extensible adapters, and support for images, videos, translations, alternates, and Google News.

---

📦 Part of the Sitemap Family
----------------------------

[](#-part-of-the-sitemap-family)

This is the PHP implementation of our multi-language sitemap library:

- 🐘 **[Sitemapper](https://github.com/skywalker-labs/sitemapper)** - PHP 8.2+ implementation with Laravel &amp; Symfony support (this package)
- 📘 **[npm-sitemap](https://github.com/skywalker-labs/npm-sitemap)** - TypeScript/JavaScript implementation for Node.js and frontend frameworks
- 🔷 **[go-sitemap](https://github.com/skywalker-labs/go-sitemap)** - Go implementation for high-performance applications

All implementations share the same API design and features, making it easy to switch between languages or maintain consistency across polyglot projects.

🔗 Recommended Projects
----------------------

[](#-recommended-projects)

If you find **Sitemapper** useful, you might also be interested in these related projects:

- 🔍 **[php-seo](https://github.com/skywalker-labs/php-seo)** - Comprehensive SEO toolkit for meta tags, structured data, and search optimization
- 🤖 **[php-chatbot](https://github.com/skywalker-labs/php-chatbot)** - Conversational AI and chatbot framework for PHP applications
- 📰 **[php-feed](https://github.com/skywalker-labs/php-feed)** - RSS, Atom, and JSON feed generator for content syndication
- 🌍 **[php-geolocation](https://github.com/skywalker-labs/php-geolocation)** - IP geolocation, geocoding, and geographic data utilities

---

✨ Features
----------

[](#-features)

- **Framework-agnostic**: Use in Laravel, Symfony, or any PHP project
- **Multiple formats**: XML, TXT, HTML, Google News, mobile
- **Rich content**: Supports images, videos, translations, alternates, Google News
- **Modern PHP**: Type-safe, extensible, and robust (PHP 8.2+)
- **High test coverage**: 100% code coverage, CI/CD ready
- **Easy integration**: Simple API, drop-in for controllers/routes
- **Extensible**: Adapters for Laravel, Symfony, and more
- **Quality tools**: PHPStan Level max, PSR-12, comprehensive testing
- **Input validation**: Built-in URL, priority, and frequency validation
- **Type-safe configuration**: Fluent configuration with `SitemapConfig` class
- **Fluent interface**: Method chaining for elegant, readable code

---

🔗 Quick Links
-------------

[](#-quick-links)

- 📖 [Installation](#installation)
- 🚀 [Usage Examples](#usage)
- 🧪 [Testing &amp; Development](#testing--development)
- 🤝 [Contributing](CONTRIBUTING.md)
- 🔒 [Security Policy](SECURITY.md)
- 💝 [Support &amp; Funding](FUNDING.md)
- 📄 [License](#license)

---

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

[](#-installation)

### Requirements

[](#requirements)

- **PHP 8.2+**
- **Composer**

### Install via Composer

[](#install-via-composer)

```
composer require skywalker-labs/sitemapper
```

No additional configuration required! The package works out of the box.

---

🚀 Usage
-------

[](#-usage)

### Laravel Example

[](#laravel-example)

**Controller method:**

```
