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

Replaced default search with Google #1667

Closed
wants to merge 1 commit into from

Conversation

sadiqkhoja
Copy link
Contributor

@sadiqkhoja sadiqkhoja commented Sep 29, 2023

Default search is full of issues: https://github.com/sphinx-doc/sphinx/labels/html%20search

I think Google search is our best bet.

I have created a rst page to show the results but didn't add it in toc so build throws checking consistency... getodk-docs/docs/google-search.rst: WARNING: document isn't included in any toctree. Is there any better way? or is it ok to ignore this warning. (if we go with this route then we need to add this page to ignore list of robot.txt)

Google provides many layouts, I am using "result only", which gives us ability to use custom search box and show results in a separate page. The reason to choose this approach is that default search-box of Google doesn't match our theme, especially it contains search button that takes significant space. And I am trying to avoid hacky customization.

Alternative approach is to use "overlay" layout, which shows search result in a modal box. That way we won't need a separate search rst page.

nb: I have created "Programmable Search Engine" under my getodk account to generate cx. Is that okay or another account should be used?
https://programmablesearchengine.google.com/u/4/controlpanel/all

What is left to be done in the addressed issue?

  • Google search result doesn't respect dark/light switch - need to write css for that

image

@sadiqkhoja
Copy link
Contributor Author

Google search is full of ads in free version and paid plan is $5 per 1K searches, which is too expansive. Need to do something to the sphinx search

@sadiqkhoja sadiqkhoja closed this Sep 29, 2023
@lognaturel lognaturel mentioned this pull request Sep 29, 2023
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.

None yet

1 participant