hooks.guide icon indicating copy to clipboard operation
hooks.guide copied to clipboard

Search?

Open Haroenv opened this issue 5 years ago • 7 comments

It would be nice to use this centralised place to be able to search across all docs of the hooks.

We can add DocSearch (like on the react docs) on this page. What do you think?

Haroenv avatar Nov 02 '18 02:11 Haroenv

That would be lovely to have. I just applied for it. Thank you for suggesting it 👍 💯

Raathigesh avatar Nov 02 '18 03:11 Raathigesh

@Raathigesh Have you started working on this?

vivek12345 avatar Nov 02 '18 08:11 vivek12345

I applied through https://community.algolia.com/docsearch/. Apparently, there will be details sent to my mail when they review the request. I'll update here when I hear back from them :)

Raathigesh avatar Nov 02 '18 09:11 Raathigesh

Yes, a colleague of mine will get back to you in a few hours. You can create a React DocSearch component like this one:

https://github.com/facebook/immutable-js/blob/master/pages/src/docs/src/DocSearch.js

or this one:

https://github.com/reactjs/reactjs.org/blob/master/src/components/LayoutHeader/DocSearch.js

Haroenv avatar Nov 02 '18 09:11 Haroenv

👋 @Raathigesh @vivek12345

Such a great news. I am working on DocSearch.

In order to extract the right information of your pages, could you use static classes or regular <hX/> tags for your titles? We need to define some selectors to find the proper hierarchy of your text.

Feel free to have a look to some recommendations we do.

Once this is ready, ping me, I will provide you the snippet to integrate

s-pace avatar Nov 02 '18 12:11 s-pace

Thanks for reaching out @s-pace. I will start reading on the selector format that you mentioned and will accordingly make the changes. 👍

vivek12345 avatar Nov 02 '18 12:11 vivek12345

Hey @s-pace,

Sorry about the delay. I have added classes prefixed with "doc-" to the navigation items as well as the content items. Please let me know if that helps or anything else we need to do.

Raathigesh avatar Nov 11 '18 09:11 Raathigesh