An option for trailing slash would improve SEO

egidioFrat
0
egidioFrat
commented 8 months ago

What problem does this feature solve?

Missing trailing slash on URL of a directory force github pages to redirect HTTPS to HTTP.
https://github.com/isaacs/github/issues/289

What does the proposed changes look like?

It could be an option to add trailing slash to static URL in sitemap.xml

idea
0
hareku
15
hareku
commented 8 months ago

Yes. I need to append trailing slash too.

0
derevandal
50
derevandal
commented 6 months ago

@egidioFrat @hareku
I use filter feature:

filter ({ routes }) {
  return routes.map(route => route.url = `${route.url}/`)
}
0
NicoPennec
1.3k
NicoPennec
commented 6 months ago

@derevandal
correct! since sitemap-module v0.2, use a custom filter is the simple way to fix the issue.

@egidioFrat @hareku
if necessary, we can add a new option to the module in order to auto add a trailing slash on each route. Do you think is useful ? or add your custom filter is enough ?

0
egidioFrat
0
egidioFrat
commented 6 months ago

I guess this filter solution is enough. Thank you @derevandal and @NicoPennec

0
Informations
Feature Request โ€ข Open
#c32 - Created 8 months ago