Open jaymarvels opened 1 year ago
@marisks Any input?
As I remember, it is enough to follow configuration documentation here: https://github.com/Geta/geta-optimizely-sitemaps/tree/master#configuration So call AddSitemaps, AddSitemapsCommerce, and make sure that razor pages are mapped.
@marisks Yeah unfortunately its not working. I am guessing it could be due to it being multi site, multi language, multi catalog it can't get the correct one.
If I create my own sitemap and commerce generator by implementing the public virtual member, eg:
public class StandardAndCommerceSitemapXmlGenerator : CommerceSitemapXmlGenerator, ICommerceAndStandardSitemapXmlGenerator
{
//
}
And just use the default from the repo as an override:
protected override IEnumerable<XElement> GetSitemapXmlElements()
{
var rootContentReference = _referenceConverter.GetRootLink();
if (SitemapData.RootPageId != Constants.DefaultRootPageId)
{
rootContentReference = new ContentReference(SitemapData.RootPageId)
{
ProviderName = "CatalogContent"
};
}
var descendants = ContentRepository.GetDescendents(rootContentReference);
return GenerateXmlElements(descendants);
}
Then descendants is always empty.
Have you configured RootPageId for the catalog you want to generate a sitemap?
Are there any additional configuration to get this to work with commerce apart from adding:
services.AddSitemapsCommerce();
In the configuration docs (https://github.com/Geta/geta-optimizely-sitemaps/blob/master/docs/editor-guide.md) it talks about the format and how its currently standard or mobile. If I do check the "standard and commerce" option and run the scheduled job my commerce product pages still do not show in the sitemap.xml.
Is something missing?