Skip to content

Some pages are displayed twice in search results (with and without .html) #15342

Closed
@HugoImaios

Description

@HugoImaios

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

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

  • press Ctrl + K
  • type "Babel"
  • scroll to "Guide & APIs" results section
  • see duplicated items (preview are the same and their page have the same content)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions