Skip to content
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

feat: add algolia docsearch #1034

Open
wants to merge 4 commits into
base: beta
Choose a base branch
from
Open

feat: add algolia docsearch #1034

wants to merge 4 commits into from

Conversation

olizilla
Copy link
Collaborator

@olizilla olizilla commented Jul 30, 2020

Integrate Algolia DocSearch into the site as per https://docsearch.algolia.com/docs/dropdown, along with UI fixes required to make it work... we have to pull the search bar out of the scrollable area, otherwise the search results are cropped / appear under the main body content. As such this pulls the header and search bar out of the nav, so it's just the TOC that scrolls.

Docsearch is like algolia premium. We dont have to set up algoila indexing at all, just add a js script to the page and they do all the scraping. Without that, we have to import our content to their servers and set up an action to re-import it when the main branch changes. With docsearch they scrape the deployed site for for us every 24 hours. For the curious, they maintain a public repo with the > 2k other docs sites that they index: https://github.com/algolia/docsearch-configs/tree/master/configs

typo proof search results
Screenshot 2020-07-30 at 16 23 05

TODO:

  • wire up docsearch
  • fix UI
  • get algolia indexing beta.spec.filecoin.io and update the index name and api key
  • improve narrow screen layout

Fixes #984

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

TODO
- get algolia indexing beta.spec.filecoin.io and update the index name
- get algolia api key
- improve narrow screen layout

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla olizilla added the hint: beta Hint: Issues related to the beta branch label Jul 30, 2020
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
and with that, fancy search arrived!

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla olizilla marked this pull request as ready for review July 30, 2020 15:27
@olizilla olizilla changed the title wip: add algolia docsearch feat: add algolia docsearch Jul 30, 2020
@olizilla
Copy link
Collaborator Author

This has been updated to work with single page mode, but it will return results that link to the multipage site until algolia's next scrape which should be sometime today. (they scrape beta.spec.filecoin.io every 24hrs, and single-page mode got merged yesterday)

@ianconsolata
Copy link
Collaborator

@olizilla this is more than 3 years old now -- is this PR still relevant, or can I close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hint: beta Hint: Issues related to the beta branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add algolia search
2 participants