docusaurus-plugin-search-local
docusaurus-plugin-search-local copied to clipboard
Fixing links to search results if hash is present
For some reason my search index after docusaurus build contains u and h that are the same except h also has a hash, so the following code will always produce wrong links for any search result that's a deep link. The fix resolves the problem.
{"i":4,"t":"Introduction","u":"/blog/2024/05/01/xyz","h":"/blog/2024/05/01/xyz#introduction","p":2}
The original code makes sense if the search-index.json h entry would only contain the hash and nothing else but that's not what I get. Please review and let me know if there's some other configuration setting that fixes this.