presta / sitemap-bundle
A Symfony bundle that provides tools to build your application sitemap.
Installs: 7 122 870
Dependents: 26
Suggesters: 2
Security: 0
Stars: 356
Watchers: 25
Forks: 102
Open Issues: 16
Type:symfony-bundle
Requires
- php: >=7.2.5|>=8.0.2
- ext-simplexml: *
- symfony/console: ^5.4|^6.0|^7.0
- symfony/framework-bundle: ^5.4|^6.0|^7.0
Requires (Dev)
- doctrine/annotations: ^1.0
- phpstan/phpstan: ^1.4
- phpunit/phpunit: ^7.5|^8.0
- squizlabs/php_codesniffer: ^3.5
- symfony/browser-kit: ^5.4|^6.0|^7.0
- symfony/messenger: ^5.4|^6.0|^7.0
- symfony/phpunit-bridge: ^5.4|^6.0|^7.0
- symfony/yaml: ^5.4|^6.0|^7.0
- 4.x-dev
- v4.1.1
- v4.1.0
- v4.0.0
- 3.x-dev
- v3.3.1
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.0
- v3.0.0
- 2.x-dev
- dev-master / 2.x-dev
- v2.5.0
- v2.4.0
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.1
- v2.0.0
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- 1.x-dev
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- 1.5.x-dev
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.2
- 1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
- dev-fixed-phpstan-uri-always-defined
- dev-bump-testing-matrix
- dev-fix-phpstan-uri-undefined
- dev-revert-337-https
- dev-fix-documentation-for-absolute-url
- dev-fix-access-to-fragmented-urlset
- dev-cherry-pick-e82473a
- dev-composer-branch-aliases
- dev-prepare-arguments-order-change
- dev-resolve-deprecated
- dev-urlgenerator-deprecations
- dev-switch-to-latest-symfony-6.3
- dev-use-event-listener
- dev-fix-tests-badge-4.x
- dev-fix-github-test-branches
- dev-fix-tests-badge-3.x
- dev-revert-649767e
- dev-fix-phpstan-arrayshape
- dev-allow-symfony-6
- dev-compatibility-with-symfony6
- dev-fix-phpstan
This package is auto-updated.
Last update: 2024-11-11 09:22:24 UTC
README
This bundle handle your XML sitemap in a Symfony application.
Overview
Allow sitemapindex file:
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://acme.org/sitemap.static.xml</loc> <lastmod>2020-01-01T10:00:00+02:00</lastmod> </sitemap> </sitemapindex>
and urlset files:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <url> <loc>https://acme.org/</loc> <lastmod>2020-01-01T10:00:00+02:00</lastmod> <changefreq>daily</changefreq> <priority>0.5</priority> </url> <url> <loc>https://acme.org/contact</loc> <lastmod>2020-01-01T10:00:00+02:00</lastmod> <changefreq>daily</changefreq> <priority>0.5</priority> </url> </urlset>
A sandbox is available in a dedicated GitHub repository.
You may also have a look to Prestaconcept's website sitemap (which is built with this bundle).
Features
- Configure with a single option which routes you want to include in your sitemap
- Generate one Sitemapindex and as many Urlset as you need
- Access sitemap on the fly with a symfony controller or Dump sitemap to files for faster sitemap
- Comply with Urlset specifications : 50k items / 10MB per file
- Decorates your sitemap with images, video, mobile and multilang urls
- No database required
Documentation
You will find the detailed documentation in the following links:
- Installation
- Configuration
- Static routes usage
- Dynamic routes usage
- Decorating URLs
- Dumping sitemap
- Messenger integration
Versions
This bundle is compatible with all Symfony versions since 2.3.0
.
However, like Symfony, we do not provide support for Symfony's version that reached EOL.
Contributing
Please feel free to open an issue or a pull request, if you want to help.
Thanks to everyone who has contributed already.
This project is supported by PrestaConcept
Released under the MIT License