gabrielcsapo/docusaurus-plugin-search-local

highlightSearchTermsOnTargetPage not working, and more issues

Closed this issue · 2 comments

Hey there. I've been trying out this library, and I can see that multiple things are not working: -

  • highlightSearchTermsOnTargetPage not working: When I set this to true, search items in the search page are being marked, but I do not see that happening anywhere else. This is a duplicate of #71
plugins: [
    [
      require.resolve("docusaurus-plugin-search-local"),
      {
        // `hashed` is recommended as long-term-cache of index file is possible.
        hashed: true,
        highlightSearchTermsOnTargetPage: true, // this should highlight the search text everywhere
      },
    ],
  ],
  • I tried contributing by making a fork of the repo and there seem to be some initial problems. For installing the node_modules for the Plugin, I had to install the modules using --legacy-peer-deps and the same had to be done for the website as well. However, the bigger problem was that I was unable to run and build the website.

Did I miss any step, or am I doing something wrong?

@rishabmahesh

Hi, What version did you use?
The latest version(@2.0.1) is working!
And I think highlightSearchTermsOnTargetPage function is only working in 'See All Results' page. '~/search'

Hey @HelloHailie. I might have misunderstood how search would have been working in that case. Unfortunately I don't have access to that code anymore, so I wouldn't be able to contribute this issue further