Skip to content

Commit

Permalink
✨ support for bnomei sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Aug 6, 2021
1 parent 96b51ec commit 375ca49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions classes/Robotstxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 375ca49

Please sign in to comment.