-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some pages are displayed twice in search results (with and without .html
)
#15342
Comments
.html
).html
)
Can you provide the source code of where the error is occurring so I can see if I can fix it. |
It's not linked to any particular code from vite library, it's an issue concerning its documentation website |
The Vite site does enable Netlify's Pretty URL feature, but it seems like it doesn't redirect to the prettier URL, it only enables "understanding" how to fallback for pretty URLs. I'm not sure if there's anything we can do without changing the hosting platform, unless we manually configure redirects. |
Oh ok! |
Adding |
would you like me to open a PR with that or are you still gathering information ? |
@HugoImaios I would appreciate it if you could open a pull request. 👍 |
Documentation is
Explain in Detail
For some reason (seo?) that is not questioned here, documentation pages are indexed both as /path and /path.html
It's quite transparent when navigating, but when searching, it causes some results to appear twice.
For example, when searching the string "Babel", we get in the "Guide & APIs" section of the results, these 4 results :
a) https://vitejs.dev/guide/performance.html#use-lesser-or-native-tooling
b) https://vitejs.dev/guide/performance#use-lesser-or-native-tooling
c) https://vitejs.dev/guide/philosophy.html#a-pragmatic-approach-to-performance
d) https://vitejs.dev/guide/philosophy#a-pragmatic-approach-to-performance
and as you can see, except the ".html" part of the url a) duplicates b), and so does c) with d)
Your Suggestion for Changes
before any "unique" operation is applied, strip out the .html artificial extension when processing search result
(because I guess adding those artificial ".html" was for a good reason)
Reproduction
https://vitejs.dev/guide/
Steps to reproduce
The text was updated successfully, but these errors were encountered: