-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add search to the website #52
Comments
Oh this looks pretty excellent!
I'm pretty excited about this! - it probably doesn't work offline, right? - but then.. that probably doesn't matter too much? |
Nope, it's doing a request per character, there's not really a way to make a great search offline available unless you'd have a whole search engine on your computer. What urls are that then, https://choo.io/reference/*, https://handbook.choo.io too? |
👋 Happy to help @yoshuawuyts, |
👋 @yoshuawuyts , Perfect! You can update it later on Congratulations, your search is now ready! You're now a few steps away from having it working on your website:
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '87f0d96cbd5365099c978ede57cc22f5',
indexName: 'choo',
inputSelector: '### REPLACE ME ####',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
Feel free to get back to us if you have any issues or questions regarding the integration. Have a nice day :) NB: In your email |
Seems like something went wrong with Zepto (a dependency of DocSearch), where it can't list data of input events for some reason. I don't have the bandwidth currently to make a new version of DocSearch which doesn't depend on Zepto unfortunately (there's a PR for that issue, but not much noise madrobby/zepto#1319). I also am not too sure how to initialise docsearch after I made the dom node, should I render a script element? docsearch({
apiKey: '87f0d96cbd5365099c978ede57cc22f5',
indexName: 'choo',
inputSelector: '#docsearch',
}); See my quick work at Haroenv@479d567 For the styling I guess I'll need to do |
Hey hey 👋, DocSearch could be used here to find things in the reference simpler.
Some questions first:
also cc @s-pace
The text was updated successfully, but these errors were encountered: