Skip to content

Commit

Permalink
Support for Statamic 5
Browse files Browse the repository at this point in the history
  • Loading branch information
martyf committed May 10, 2024
1 parent d746f74 commit 0db4c52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

![Statamic 3.3+](https://img.shields.io/badge/Statamic-3.3+-FF269E?style=for-the-badge&link=https://statamic.com)
![Statamic 4.0](https://img.shields.io/badge/Statamic-4.0-FF269E?style=for-the-badge&link=https://statamic.com)
![Statamic 5.0](https://img.shields.io/badge/Statamic-5.0-FF269E?style=for-the-badge&link=https://statamic.com)
[![Sitemapamic on Packagist](https://img.shields.io/packagist/v/mitydigital/sitemapamic?style=for-the-badge)](https://packagist.org/packages/mitydigital/sitemapamic/stats)

---

<!-- /statamic:hide -->

> Sitemapamic is a XML sitemap generator for Statamic 3.3 and Statamic 4.0
> Sitemapamic is a XML sitemap generator for Statamic 3.3, 4 and 5
Sitemapamic creates a sitemap.xml file for your Statamic site, and includes:

Expand All @@ -26,7 +27,7 @@ Sitemapamic creates a sitemap.xml file for your Statamic site, and includes:

Sitemapamic requires:

- Statamic 3.3 or Statamic 4.0
- Statamic 3.3, 4 or 5
- PHP 8.1+

## Documentation
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mitydigital/sitemapamic",
"description": "An XML sitemap generator for Statamic 3 and 4 that includes all collections and related taxonomy pages.",
"description": "An XML sitemap generator for Statamic 3, 4 and 5 that includes all collections and related taxonomy pages.",
"type": "statamic-addon",
"keywords": [
"statamic",
Expand All @@ -19,7 +19,7 @@
],
"require": {
"php": "^8.1",
"statamic/cms": "^3.3|^4.0"
"statamic/cms": "^3.3|^4.0|^5.0"
},
"extra": {
"statamic": {
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Sitemapamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function loadCollectionTerms(): \Illuminate\Support\Collection
{
// get the current site key based on the url
$site = 'default';
foreach (config('statamic.sites.sites') as $key => $props) {
foreach (config('statamic.sites.sites', []) as $key => $props) {
if ($props['url'] == url('/')) {
$site = $key;
break;
Expand Down

0 comments on commit 0db4c52

Please sign in to comment.