Open MrWeb opened 3 years ago
Hello @MrWeb
I haven't run Laravel with multiple domains set up. How does the configuration for this work? Wouldn't this lead to all the sitemap files being public on all of these sites at the same time?
Cheers, Peter
Yes, in case you have many domains pointing to the same code in the server, the files will all be in the same folder. If the same code is deployed on different servers/folders then only one file will be created.
We could go with two options
php artisan sitemap:generate
and
php artisan sitemap:generate my-site.com
The first one creates a sitemap.xml
and looks in the env('APP_URL')
as it does currently.
The second one looks for that url specified in the command and creates a sitemap-{url}.xml
Okay, sounds good @MrWeb. Do you want to start a draft PR?
We use the same codebase for more than one site and therefore we have more than one domain.
I'd like to extend the package to accept a
url
argument, and create asitemap-{url}.xml
file. If the argument is empty theenv('APP_URL')
is the default url.I want to know if this is something you can consider me to update or not, so I know what to do. Tks