nhayder
4 months ago
528
6
Laravel

spatie/laravel-sitemap creating empty sitemap.xml

Posted 4 months ago by nhayder

i'm using spatie/laravel-sitemap to generate sitemap.xml file dynamically, The package is not creating the site map but its always empty.

packager usrl : https://github.com/spatie/laravel-sitemap

created sitemap.xml

// this is what im getting every time
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
</urlset>

this is how im generating the file???

SitemapGenerator::create(config('app.url'))->writeToFile(public_path('sitemap.txt'));

if there is anyone who is using this package? can you see what is the problem

All the best

Please sign in or create an account to participate in this conversation.