I did a (very) quick look at the repository you linked, and it seems the default implementation is registered like this https://github.com/Geta/geta-optimizely-sitemaps/blob/59625a6952ef01209f860285ae86f1eac2f2d61d/src/Geta.Optimizely.Sitemaps/ServiceCollectionExtensions.cs#LL45C57-L45C57
and it seems you need to override the default implementation. i.e. your registration needs to be after AddSitemaps
You probably want to make your registration Singleton as well
I have noticed that it was singeton in the default implementation, tested singleton, no difference.
It is an override
not sure what you mean with "after AddSitemaps", is it this?
I meant something like this
services.AddSiteMaps();
services.AddSingleton<IContentFilter, GetaSiteMapContentFilter>();
the default implementation is registered in AddSiteMaps, so yours needs to be registered after to override it (not the override method as you thought) :)
Following the instructions in geta-optimizely-sitemaps we have implemented additional logic in ShouldExcludeContent method but when running the Generate search engine sitemaps job no break-points in this override are hit and the logic written in here does not apply.
Anyone else ran into this or has any ideas why that is so?