Skip to content

docs(website): add search to the website #1116

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

Merged
merged 2 commits into from
Jan 22, 2020

Conversation

vvo
Copy link
Contributor

@vvo vvo commented Jan 17, 2020

Description

This commit adds documentation search to the whole website using Algolia's
DocSearch project: https://community.algolia.com/docsearch/

I tried to be as close as the Faraday design as possible.

fixes #1110 (at least it provides an easy way to search for pages, even if pages are not clearly laid out in the navigation)

You can test the search here: https://faraday.codeagain.now.sh/

2020-01-17 16 00 49

Todos

List any remaining work that needs to be done, i.e:

  • Get review from the Faraday team

Additional Notes

It's possible to get analytics on the search feature: what is searched, what get no results (= need to document). I have access to all of that but if you maintainers want that too, just provide me your email address and I will invite you to the application. You will have to create an Algolia account.

@vvo vvo requested a review from iMacTia January 17, 2020 15:14
@olleolleolle
Copy link
Member

image

I entered middleware and saw things immediately. Wow!

@vvo
Copy link
Contributor Author

vvo commented Jan 17, 2020

I entered middleware and saw things immediately. Wow!

That's the Algolia magic and the awesome configuration from @s-pace!

@vvo
Copy link
Contributor Author

vvo commented Jan 17, 2020

I dunno why the tests are failing, do you know @olleolleolle?

@olleolleolle
Copy link
Member

16 failures, all in adapter/rack_spec... Hm


rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:3:1:1]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #head behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:4:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #options behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:8:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #trace behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:1:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #delete behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:6:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #post behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:7:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #put behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:2:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #get behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:1:5:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL enabled #patch behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:1:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #delete behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:6:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #post behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:5:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #patch behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:8:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #trace behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:7:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #put behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:4:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #options behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:3:1:1]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #head behaves like a request method handles headers with multiple values
rspec './spec/faraday/adapter/rack_spec.rb[1:1:2:2:1:2]' # Faraday::Adapter::Rack behaves like an adapter with SSL disabled #get behaves like a request method handles headers with multiple values

@vvo
Copy link
Contributor Author

vvo commented Jan 21, 2020

Just to make sure, @iMacTia or @olleolleolle are you still interested in this? Maybe waiting for me to fix the build? Since I only changed documentation files, not sure why this would be failing :D

This commit adds documentation search to the whole website using Algolia's
DocSearch project: https://community.algolia.com/docsearch/.
Analytics are available via an Algolia account, ask [email protected] for
more information.

I tried to be as close as the Faraday design as possible.
@vvo vvo force-pushed the docs/add-documentation-search branch from 903f4e3 to 008321b Compare January 21, 2020 11:38
@olleolleolle
Copy link
Member

olleolleolle commented Jan 21, 2020

@vvo We are very interested in the change, but are also snooping around for clues about the build failure. The 2.1.1 of rack has moved forwards, whereas rack-test has stood still. Perhaps something else is needed from our rack test set-up, now.

That is, we're investigating!

Hm, was it something about this middleware? rack/rack@10512e6

@vvo
Copy link
Contributor Author

vvo commented Jan 21, 2020

The weird thing is that master seems to be green ✔️. But on this PR it's just master with doc/ changes so that does not makes sense. Maybe there's a glitch in the GitHub actions configuration? I could have a look at that if you want maybe.

@olleolleolle
Copy link
Member

@vvo https://github.com/lostisland/faraday/actions?query=workflow%3ACI latest CI build on master was 12 days ago, rack releases have happened in between.

@vvo
Copy link
Contributor Author

vvo commented Jan 21, 2020

@olleolleolle Ohhh right, well it all depends on how and where we depend on Rack I guess. I am used to dependency pining to avoid such situations (at least if it's a dev-only direct dependency). So that your dev workflow is not blocked by a dependency that has no impact on the release of the library.

I am definitely new to Ruby and coming from Node.js where yarn.lock files are used even in libraries to allow locking dev-dependencies only.

Good luck and let me know if you need help!

@olleolleolle
Copy link
Member

I have catalogued the issue that breaks the build as #1119

@olleolleolle olleolleolle merged commit 099dd45 into lostisland:master Jan 22, 2020
@olleolleolle
Copy link
Member

Thanks, @vvo, a lot, for giving us this present!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation should provide a clearer list of pages
2 participants