Open humitos opened 1 year ago
I think I'd be happy to add a 🔗 icon in the search modal that copy the original URL + ?readthedocs-search-query="<the query goes here>"
into the clipboard, in case they want to share it. This will solves the problem of modifying the URL and changing the history each time a char is typed.
Once the URL with the search query is opened, the search modal will open automatically and the query will be performed, showing the results.
I'd love to see this work, so that we can link folks to a page with a search result.
The Sphinx extension supports
?rtd_search="my query"
in the URL.However, I removed this feature for now from the current implementation because it makes some things more complex at the moment. We should consider re-implementing it if we think it's useful.
Also, the same feature modifies the browser's history each time you perform a search, which is pretty annoying when you do multiple queries and then want to go back.
I don't think it's a good idea to modify the URL unless there are good reasons to do that. I'm happy to talk more about this feature, tho.