Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search result doesn't have URI fragment link #147

Open
jmthomas opened this issue May 9, 2024 · 1 comment
Open

Search result doesn't have URI fragment link #147

jmthomas opened this issue May 9, 2024 · 1 comment

Comments

@jmthomas
Copy link

jmthomas commented May 9, 2024

I'm using docusaurus and this plugin on our site: https://docs.openc3.com/docs. Search works well but the link always just links to the base page and doesn't add the URI fragment that links to the actual text. For example searching for ID_ITEM will generate a result with a link of https://docs.openc3.com/docs/configuration/telemetry##. The double hashes seem to indicate that the URI fragment wants to be there but it's not.

Our full configuration is here: https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com and the generated site is here: https://github.com/OpenC3/cosmos/tree/main/docs

I'm not doing anything special to configure the plugin. Just added it to the package.json dependencies and to the docusaurus.config.js in the plugins section.

@paolochang
Copy link

Hi @jmthomas ,

I also found this bug on our documentation site.

Search a page works as expected, but search by a subheader (h2, h3) in the page doesn't work. I also get double # at the end of the url. For example, if I search by the keyword "downloads", the url will be /dashboard/overview##

I found the incorrect url generated in search-doc.json. Please check the image below:

image

I'm using "docusaurus-lunr-search": "^2.3.2", and swizzled to update the css only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants