Skip to content

Search box needed #263

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

Open
bjnath opened this issue May 23, 2020 · 16 comments
Open

Search box needed #263

bjnath opened this issue May 23, 2020 · 16 comments

Comments

@bjnath
Copy link
Contributor

bjnath commented May 23, 2020

I don't see a search box on the site, and I didn't find search mentioned in the issues. Is that correct? Is one in the works?

Users expect a search box on every site, but especially on a site that exists to be informative.

I imagine there are technical challenges because of the split content. We somehow need to solve them.

Imagine the response if we go live without a search box. "They put up this fancy new site and forgot / took away the search box."

@rgommers
Copy link
Member

Good point, we don't have one but do need one. So much to think about when building a nice website ....

There's some options to implement one at https://gohugo.io/tools/search/

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

But Hugo search isn't adequate.

Users will put NumPy questions in the search box and expect the same answers they do now. Users don't know there's a different site under the cover.

Search results must come from Hugo and Sphinx, and if either of them is expendable it's Hugo.

@joelachance
Copy link
Collaborator

But Hugo search isn't adequate.

Sure it is! It searches the site.

Users will put NumPy questions in the search box and expect the same answers they do now. Users don't know there's a different site under the cover.

Probably true, but we don't know this. I don't think we can expect adding search to be the same as using StackOverflow.

Is this something we want to add before launch? Because if it is, I'd push to start small, and add as we go. I agree search for both the site & docs would be great, I'm not sure it's doable by the time we want to launch, which I was understanding was very soon.

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

It searches the site.

There are two sites, with HTML in different places.

@joelachance
Copy link
Collaborator

@bjnath Yep, of course. But it will be a good amount of work to search both sites. Starting small is in our best interest.

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

starting small

"Starting small" would mean passing through Sphinx search and ignoring Hugo for now.

We can't give users a search box that's broken for the kinds of queries people expect the site to answer.

@joelachance
Copy link
Collaborator

@bjnath I think that would be great, I'd welcome a PR if you want to tackle it!

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

@joelachance Cool -- let me take a look.

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

Low-stress solution: a hyperlink that looks like a search box:

image

The user has to click on the box to fill it out. Instead of going blank, it takes the user to https://numpy.org/devdocs/search.html, our real search page:

image

Less annoying than you'd think, when I tried it out.

It's not perfect, but it solves the users' problem and ours.

Gist: https://gist.github.com/bjnath/d1830c3434413ecfeaca3bc36fb99d3d

@rgommers
Copy link
Member

That'd be a good stopgap solution (with some styling). Where would we put it - right side of the navbar?

@rgommers
Copy link
Member

https://pytorch.org/ has a styled looking glass in the right top corner that's quite nice. With live incremental search. Not for now, just noting cause it's pretty cool.

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

right side of the navbar?

That's what I'd envisioned. I'm open to any place you'd expect a search bar to be.

with some styling

Yes, please! That was strictly proof of concept.

@stefanv
Copy link
Contributor

stefanv commented May 23, 2020

https://pytorch.org/ has a styled looking glass in the right top corner that's quite nice. With live incremental search. Not for now, just noting cause it's pretty cool.

That is pretty neat! And, this should be quite doable, since Sphinx has a JS library, and StackOverflow has an API.

Agreed that this can wait, but would be fun to build.

@bjnath
Copy link
Contributor Author

bjnath commented May 23, 2020

I assume everyone has already clicked and found how painlessly they're doing it?

https://docsearch.algolia.com/

@rgommers
Copy link
Member

I hadn't - looks pretty cool!

@joelachance
Copy link
Collaborator

@bjnath, nice find!

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

No branches or pull requests

4 participants