-
Notifications
You must be signed in to change notification settings - Fork 1k
Add Algolia search on header bar #469
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
Conversation
WOW! This is incredible! I'll raise this tomorrow during the Scala meeting to take a vote, but it looks amazing. The demo you link to is really great. The only issue I foresee is that currently scala.github.com runs on Github Pages which means that Jekyll plugins are forbidden, regardless of the version of Jekyll we run. Therefore, just to re-verify, everything is fine with this PR in the absence of Jekyll plugins? Algolia will build an index from our documentation sources on github? Could you explain a bit more about how that's done? I imagine that if we accept this PR, and then reorganize the site, it could have some sort of implications for your indexing, no? |
Hi @heathermiller, Yes you can't use a Jekyll plugin with Github Pages. But, you can run it in travis like here. Yes, the PR is complete as the moment (just need to update the Algolia API keys to give you "production" ones. Yes, if the website is reorganized, it will have some implications on the indexing, because we use CSS selectors to find the data on the pages (eg: all Thanks, |
Cool! We have a documentation server inside ENSIME for the user's project's dependency's docs. Would it be possible for us to use your search embedded? We're also really keen on creating a Hoogol style type search customised to a project. The tough bit is defining the search DSL . is that something you've thought about? |
Oh we'd need to wait for you to release on a GPL compatible license. |
@fommil: You can use Algolia wherever you want, it's a SaaS product, with a free hacker plan. The dropdown menu is made with autocomplete.js which has a MIT licence. The scrapping is made by an internal tool, not yet available as OpenSource, but we have a docker image with the python code in it, so you can check it out. |
@ElPicador not interested in SaaS, we'd need it integrated, sorry. |
Hoogol style search wouldn't be captured by "advanced search". It's really very scala specific. |
Hi @ElPicador, thanks again for this PR! We discussed it at a group meeting, and everyone seems to like it :) Two things:
Thanks again. This is very cool :) |
|
@heathermiller I had time today, so the API keys are updated |
@heathermiller: Could you wait for tomorrow? We have so UI improvement on the way (like http://eslint.org/) |
Sure thing :) Thanks @ElPicador |
@heathermiller I tried to improve the UI a bit: You can also find here the docker image of the scrapper. For the moment it's running in our infra. If you have any issues please contact [email protected] |
Awesome, thanks @ElPicador! LGTM |
Add Algolia search on header bar
Thanks @heathermiller 😄 |
@ElPicador : Just a suggestion, but it'd be awesome if we could do something similar for the Scala specification which has no search functionality at all currently: http://www.scala-lang.org/files/archive/spec/2.11/ . |
Hello Scala team,
I've always wanted to be able to easily search inside the Scaladocs, so I've added this feature.
You can see it live and test it here: https://scaladocs.algolia.com/.
This pull request uses Algolia API to index and search the documentation.
It does not includes the indexing part, it is done with a internal tool. We have a Jekyll plugin, which handles indexing & searching but it is only compatible with version
>2.5
, and we could have a better autocomplete, with more context (as seen here).I was not sure if you wanted to upgrade your Jekyll. But if you prefer I can update the Jekyll version and add the search.
Benefits for the end user
How it works
We've created a free account for you that hosts the documentation. When a user does a search, it uses the Algolia API to retrieve the most relevant results from the documentation and display them in a dropdown.
Testing the pull request locally
If you want to test the PR locally, you can just launch Jekyll.
Updating the index
As it uses our internal tool, it will be update once in a day.
But if you prefered the Jekyll plugins, it adds a new command:
jekyll algolia push
. This will read the generated HTML files from a jekyll build, extract text & headers and index them in Algolia. You'll basically have to re-run this command everytime you push a new version to gh-pages. See plugin docAbout Algolia
At Algolia we provide a hosted search API and support community websites like Hackernews search, CDNJS, GrowthHackers, Product Hunt or the Laravel documentation with free plans.
If you want to move forward with this implementation, I'll send you the free and unlimited credentials to your Algolia dashboard.
I'm available for any questions you may have or any more information you would need.