grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.06k stars 435 forks source link

Sitemaps in Robots.txt is wrong #440

Closed Macka323 closed 8 months ago

Macka323 commented 9 months ago

https://github.com/grandnode/grandnode2/blob/31cb21deaedf1cea67ae909493905b1ec408ea75/src/Business/Grand.Business.System/Services/Installation/InstallDataRobotsTxt.cs#L17

This only works if there is one language. But if there are multiple. We would need to make sitemap link for every single one.

KrzysztofPajak commented 9 months ago

@Macka323 This method is used only when you install new instance of application.

Macka323 commented 9 months ago

Sorry my bad, i forgot that you cannot chose languages on initialization.

But can we make it update the sitemaps urls automatically. If we add/remove language or store. Or it will be unnecessary/useless to implement it.

This is the sitemaps template for multiple stores and languages: http://storeurl.com/sitemap-{storeShortcut}-{langSeoCode}.xml

KrzysztofPajak commented 9 months ago

There is exists scheduled task - Generate sitemap XML file It generates a file according to what you wrote: http://storeurl.com/sitemap-{storeShortcut}-{langSeoCode}.xml