diff --git a/README.md b/README.md index 6d0a8d6..5b9f7b7 100644 --- a/README.md +++ b/README.md @@ -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) --- -> 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: @@ -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 diff --git a/composer.json b/composer.json index 745102f..4d72e24 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -19,7 +19,7 @@ ], "require": { "php": "^8.1", - "statamic/cms": "^3.3|^4.0" + "statamic/cms": "^3.3|^4.0|^5.0" }, "extra": { "statamic": { diff --git a/src/Support/Sitemapamic.php b/src/Support/Sitemapamic.php index 1fc52dd..54b7993 100644 --- a/src/Support/Sitemapamic.php +++ b/src/Support/Sitemapamic.php @@ -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;