diff --git a/changelog.md b/changelog.md index 15acfd2..bfc141d 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,12 @@ All notable changes to `sitemap-generator` will be documented in this file. +## Version 1.0.3 + +- Fixed Sitemap output was the original, not the filtered + ## Version 1.0.2 + - Fixed Ignores urls with queries (like paginated) -> **Handle only restfull urls** - Fixed reduce dry-run resulte to fit in console - Fixed Handle non html urls for witch route cannot be resolved diff --git a/src/Lib/Sitemap.php b/src/Lib/Sitemap.php index f30f194..a5c2291 100644 --- a/src/Lib/Sitemap.php +++ b/src/Lib/Sitemap.php @@ -50,7 +50,7 @@ class Sitemap // *Assign new sitemap $this->sitemap = SpatieSitemap::create(); $this->tagList->each(function (Tag $tag) { - $this->sitemap->add($tag); + $this->sitemap->add($tag->getTag()); }); } diff --git a/src/Lib/Tag.php b/src/Lib/Tag.php index d135fdc..1156926 100644 --- a/src/Lib/Tag.php +++ b/src/Lib/Tag.php @@ -160,4 +160,14 @@ class Tag { return $this->route->getName(); } + + /** + * Get original tag + * + * @return \Spatie\Sitemap\Tags\Tag + */ + public function getTag(): \Spatie\Sitemap\Tags\Tag + { + return $this->tag; + } }