{"id":20779254,"url":"https://github.com/bolt/sitemap","last_synced_at":"2025-04-30T19:40:55.654Z","repository":{"id":19664183,"uuid":"22917479","full_name":"bolt/Sitemap","owner":"bolt","description":"Bolt Sitemap extension - create XML sitemaps for your Bolt website.","archived":false,"fork":false,"pushed_at":"2023-02-02T14:50:56.000Z","size":205,"stargazers_count":19,"open_issues_count":4,"forks_count":20,"subscribers_count":8,"default_branch":"2.x","last_synced_at":"2025-03-30T19:22:05.407Z","etag":null,"topics":["bolt","bolt-extension","php","search-engine","sitemap","xml","xml-sitemap"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T13:58:40.000Z","updated_at":"2022-06-10T20:38:46.000Z","dependencies_parsed_at":"2023-02-17T21:00:30.779Z","dependency_job_id":null,"html_url":"https://github.com/bolt/Sitemap","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2FSitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2FSitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2FSitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2FSitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolt","download_url":"https://codeload.github.com/bolt/Sitemap/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251770930,"owners_count":21641176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bolt","bolt-extension","php","search-engine","sitemap","xml","xml-sitemap"],"created_at":"2024-11-17T13:26:53.897Z","updated_at":"2025-04-30T19:40:55.634Z","avatar_url":"https://github.com/bolt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sitemap\n=======\n\nThis extension will automatically create XML sitemaps for your Bolt sites.\nAfter enabling the extension, go to `http://example.org/sitemap.xml` to see it.\n\nThe bigger search-engines like Google and Bing will automatically pick up your\nsitemap after a while, but it's always a good idea to explicitly tell the\nsearch engines where to find it. To do so, this extension automatically adds\nthe link to the `\u003chead\u003e` section of your pages:\n\n```html\n\u003clink rel=\"sitemap\" type=\"application/xml\" title=\"Sitemap\" href=\"/sitemap.xml\" /\u003e\n```\n\nApart from that, it's good practice to also add the following line to your\n`robots.txt` file:\n\n```\nSitemap: http://example.org/sitemap.xml\n```\n\nObviously, you should replace 'example.org' with the domain name of your\nwebsite.\n\nThis extension adds a 'route' for `/sitemap.xml` and `/sitemap` by default, but\nit has lower priority than user defined routes.\n\nIf you use the `pagebinding` in `routing.yml`, or anything similar route that\nwould match 'sitemap' first, you will need to add the following _above_ that\nroute. You should also do this if you have an extension that might override the\ndefault routing, like the AnimalDesign/bolt-translate extension.\n\n```yaml\nsitemap:\n  path: /sitemap\n  defaults: { _controller: sitemap.controller:sitemap }\n\nsitemapXml:\n  path: /sitemap.xml\n  defaults: { _controller: sitemap.controller:sitemapXml }\n```\n\nNote, if you have a ContentType with the property `searchable: false`, that\ncontent type will be ignored.\n\n## Advanced links list control\n\nIf you have your own bundled extension you can add, remove or change links\nbefore the sitemap is rendered. You need to subscribe to the \n`SitemapEvents::AFTER_COLLECTING_LINKS` event. The object you will get is\nan instance of `SitemapEvent` class which has a `getLinks` method that returns \na `MutableBag` object. The last one is an array-like list of links. See example:\n\n```php\nprotected function subscribe($dispatcher)\n{\n    $dispatcher-\u003eaddListener(SitemapEvents::AFTER_COLLECTING_LINKS,\n        function ($event) {\n            /** @var SitemapEvent $event */\n            $links = $event-\u003egetLinks();\n            $links-\u003eadd([\n                'link'  =\u003e '/lorem-ipsum',\n                'title' =\u003e 'Hello World!',\n                'depth' =\u003e 1,\n            ]);\n        }\n    );\n}\n```\n\n## Sitemap stylesheets\n\nYou can customize the sitemap with an xslt stylesheet if you copy the `templates/sitemap_xml.twig`\nfile and the `web/sitemap.xsl` file to your theme directory and by adding the xsl-stylesheet declaration\nafter the xml declaration so the first two lines of the `themes/{yourthemename}/sitemap_xml.twig` look like:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c?xml-stylesheet type=\"text/xsl\" href=\"{{ paths.theme }}/sitemap.xsl\"?\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Fsitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolt%2Fsitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Fsitemap/lists"}