express-sitemap
express-sitemap copied to clipboard
Overriding ALL
I have a use case where I want to set a default changefreq
for all routes except one. Hence why I think it would be neat to allow overriding of the ALL
route keyword. Like this:
route: {
'/': {
lastmod,
changefreq: 'always',
priority: 1.0,
},
'ALL': {
lastmod,
changefreq: 'always',
priority: 0.8,
}
}
Changing the following line allows us to override ALL
:
https://github.com/hex7c0/express-sitemap/blob/90e41ba0755ccfd7f9fcd93ede7eae9a089f99d1/index.js#L318
var rr = route[uri] || route.ALL || false;
It is worthwhile to mention that I have not investigated the txt
function.