Skip to content

Fix search#678

Merged
bdice merged 4 commits into
rapidsai:mainfrom
bdice:fix-search
Sep 10, 2025
Merged

Fix search#678
bdice merged 4 commits into
rapidsai:mainfrom
bdice:fix-search

Conversation

@bdice
Copy link
Copy Markdown
Contributor

@bdice bdice commented Sep 10, 2025

#642 broke the syntax in assets/js/just-the-docs.js. This fixes it.

Closes #677.

@bdice bdice requested a review from a team as a code owner September 10, 2025 16:08
@bdice bdice mentioned this pull request Sep 10, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 10, 2025

Deploy Preview for docs-rapids-ai ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f6043c4
🔍 Latest deploy log https://app.netlify.com/projects/docs-rapids-ai/deploys/68c1b06076ad2b00086b4363
😎 Deploy Preview https://deploy-preview-678--docs-rapids-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

function initSearch() {
var request = new XMLHttpRequest();
request.open('GET', '{{ "assets/js/search-data.json" | absolute_url }}', true);
request.open('GET', '/assets/js/search-data.json', true);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is needed to avoid cross-site requests (which fail) between the testing site (like https://deploy-preview-678--docs-rapids-ai.netlify.app/) and the main site (https://docs.rapids.ai). Otherwise our search data fails to load on the site previews.

Comment on lines +1 to -6
---
---
// SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES.
// All rights reserved.
// SPDX-License-Identifier: Apache-2.0

---
---
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the primary fix needed here. I think the inclusion of the copyright notice comments causes the Jekyll template engine not to trigger. You can see that currently, https://docs.rapids.ai/assets/js/just-the-docs.js appears to have raw template content. Moving the --- up above the copyright notice comments appears to fix it.

Comment thread _config.yml
slack:
name: Slack
url: https://join.slack.com/t/rapids-goai/shared_invite/zt-trnsul8g-Sblci8dk6dIoEeGpoFcFOQ
url: https://rapids.ai/slack-invite
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated fix -- just something we've standardized in most places that I noticed while looking over the config.

@bdice bdice requested a review from ncclementi September 10, 2025 17:07
Copy link
Copy Markdown
Contributor

@ncclementi ncclementi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bdice

There is one thing I'm not sure if it is a consequence of this PR or if it is part of the preview feature. But when if try to access on the preview link https://deploy-preview-678--docs-rapids-ai.netlify.app/api/ any of the API docs, it leads to a Page Not Found. Is that a known issue?

If that's not a consequence of this PR, I'm happy to merge and then open a separate issue, about it.

Separate note, but we can open another issue about this too. When we are searching something like cudf or cuml, the first hits are not the reference to the API docs. I wonder if tehre is a way to make sure this is the first hit. For example:

Screenshot 2025-09-10 at 3 51 27 PM

@bdice
Copy link
Copy Markdown
Contributor Author

bdice commented Sep 10, 2025

Good questions.

The preview site does not actually include the API docs. Just the Markdown pages in this repo. It's expected that those are broken.

Similarly, the search data only indexes the pages in this repo. I don't know if there is a good way to manually inject items into the search index (or tweak the search priority) as you're asking.

I am going to merge this for now to unbreak search, but if you're interested in pursuing those other ideas, issues are welcome!

@bdice bdice merged commit 711b940 into rapidsai:main Sep 10, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

[BUG] Broken search bar

2 participants