Fix search query selector
Our site search is bugged. I think it might be because of !1192 (merged).
OpenSearch
How it used to be
- Type
docs.gitlab.com
in your browser and press Tab. - Enter the search query in the browser and press Enter.
- The browser takes you to
docs.gitlab.com/search/?q=search-query
showing the search results.
How it is now
- Type
docs.gitlab.com
in your browser and press Tab. - Enter the search query and press Enter.
- The browser takes you to
docs.gitlab.com/search/?q=search-query
but shows no search results.
Why
Now instead of ?q={search query}
we have ?query={search query}
.
The change to the file opensearch.xml
fixes this.
InstantSearch
How it used to be
- Open any docs page on docs.gitlab.com.
- Type a query in the search box.
- Do not select any results and press Enter.
- The browser takes you to
docs.gitlab.com/search/?q=search-query
showing the search results.
How it is now
- Open any docs page on docs.gitlab.com.
- Type a query in the search box.
- Do not select any results and press enter.
- The browser takes you to
docs.gitlab.com/search/?q=search-query
but shows no search results.
Why
Now instead of ?q={search query}
we have ?query={search query}
.
The change to the file header.html
fixes this.