Raathigesh / hooks.guide

🏗 Collection of React hooks curated by the community
https://hooks-guide.netlify.com/
MIT License
525 stars 47 forks source link

Search? #4

Open Haroenv opened 5 years ago

Haroenv commented 5 years ago

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?

Raathigesh commented 5 years ago

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

vivek12345 commented 5 years ago

@Raathigesh Have you started working on this?

Raathigesh commented 5 years ago

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 :)

Haroenv commented 5 years ago

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

s-pace commented 5 years ago

👋 @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 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

vivek12345 commented 5 years ago

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

Raathigesh commented 5 years ago

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.