s4u / sitemapxml-maven-plugin

Maven sitemap.xml generator plugin
https://www.simplify4u.org/sitemapxml-maven-plugin/
Apache License 2.0
5 stars 0 forks source link

Add setting to prefer clean URLs over index.html #150

Closed chabala closed 10 months ago

chabala commented 1 year ago

I'd like to configure sitemap generation to list clean URLs in cases where the default index page is found.

E.g.:

Current behavior Proposed behavior
https://example.com/index.html https://example.com/
https://example.com/path/index.html https://example.com/path/
https://example.com/other.html https://example.com/other.html (no change for non-index pages)

I'd prefer this as the default behavior, but it could be a configurable option.

Google Search Console (the consumer of the sitemap.xml) treats the clean URL and the index.html URL as distinct pages, and I want the clean URL to be canonical, and listed in the sitemap.

chabala commented 10 months ago

Thank you, these changes look good. I'm going to test out the new version.