From 375ca49b428df3e22ec4756610032552329d19c9 Mon Sep 17 00:00:00 2001 From: Bruno Meilick Date: Fri, 6 Aug 2021 14:21:27 +0100 Subject: [PATCH] :sparkles: support for bnomei sitemap --- classes/Robotstxt.php | 5 +++++ composer.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/Robotstxt.php b/classes/Robotstxt.php index 876dc9d..0fcba97 100644 --- a/classes/Robotstxt.php +++ b/classes/Robotstxt.php @@ -122,6 +122,11 @@ private function addSitemap($sitemap = null): Robotstxt $this->txt[] = 'sitemap: ' . url('/sitemap.xml'); return $this; } + $feedPlugin = kirby()->plugin('bnomei/feeds'); + if ($feedPlugin && version_compare($feedPlugin->version(), '1.4.0', '>=')) { + $this->txt[] = 'sitemap: ' . url('/sitemap.xml'); + return $this; + } // @codeCoverageIgnoreEnd $this->txt[] = 'sitemap: ' . url($sitemap); diff --git a/composer.json b/composer.json index 3bfae4b..b3b7b12 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "bnomei/kirby3-robots-txt", "type": "kirby-plugin", "description": "Manage the robots.txt from the Kirby config file", - "version": "1.4.9", + "version": "1.5.0", "license": "MIT", "authors": [ { @@ -51,6 +51,6 @@ "kirby-cms-path": "tests/kirby" }, "suggest": { - "omz13/kirby3-xmlsitemap": "Adds a xml sitemap which will be automatically be included in the robots.txt" + "bnomei/kirby3-feeds": "Adds a xml sitemap which will be automatically be included in the robots.txt" } }