ipfs / ipfs-docs

📚IPFS documentation platform
https://docs.ipfs.tech
294 stars 390 forks source link

Add Swiftype to IPFS Docs #1497

Closed johnnymatthews closed 1 year ago

johnnymatthews commented 1 year ago

Recently, Algolia search stopped working within IPFS Docs. This PR https://github.com/ipfs/ipfs-docs/pull/1489 switched the site back to using the default VuePress search. While the VuePress search does a decent enough job, it'd be great to add IPFS Docs into the Protocol Labs Swiftype account so that we can better tailor the results that users get.

Tasks

johnnymatthews commented 1 year ago

Had issues applying a custom class into the navbar with VuePress. VuePress uses an external plugin to show a search, but there isn't an documentation on how to customize this plugin with the class that Swiftype needs to insert it's logic into a site.

I've got Swiftype suggestions showing up properly:

image

And then the user can view the full suggestions by pressing enter:

image

However, these changes only exist locally because I had to manually edit files within the node_modules directory. I'm still trying to find a way to either export and use the plugin within the repo, or find a way to edit the plugin-sourced-searchbar using the config.