Skip to content

brpaz/vscode-docsearch

Repository files navigation

VSCode DocSearch extension

An all-in-one VSCode extension for searching multiple documentation sources, without leaving your editor.

GitHub Workflow Status Code Coverage Visual Studio Marketplace Installs Visual Studio Marketplace Version License

Motivation

As a Software Engineer, searching documentation is a part of the daily routine, but finding that documentation site, in the middle of your open tabs or bookmarks is not always easy.

I built this extension, to simplify the process and be able to do it directly from VSCode.

Demo

Extension Demo

Features

  • Search in dozens of documentation sites, whose search is powered by Algolia Docsearch, Mkdocs or available at DevDocs. These will probably cover 80% of documentation sites out there.
  • Open a search result in your default browser, to see the documnetation in full glory.

How it works?

This extension uses the public available endpoints of each documentation provider to do the search, so the results should be exactly the same when searching on the documentation sites directly.

There is no scrapping or indexing. It´s simply an HTTP request, to existing search engines.

Included Documentation

By default, this extension includes the following documnetation:

Docsearch

MkDocs

DevDocs

Getting started

Installation

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install brpaz.vscode-docsearch

Usage

To activate the extension, toggle your command palette and search for Documentation.

After that, you will be prompted to select the documentation site your want to search, following by a prompt to input your search query.

Disable a default documentation site

If you want to disable a default documnetation site, provided by the extension:

  1. Open command pallete and select: `Preferences: Open user settings (JSON).
  2. create a new json object like the following:
"docsearch.defaultDocsets": {
    "react": false,
  }

This example will disable React documnetation. Press CTRL+Space insde the object, to get autocomplete for the available documentations.

Add your own Documentation.

TODO

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

FAQ

A documentation site stopped working

This can happen, if there is any change in the documentation site, like changing the search provider or URL.

This is more frequent with sites provided by Algolia Docsearch, as it´s common for the website maintanters to change API Keys or other configurations of DocSearch. If you find a broken documnetation, please open an issue.

This extension includes versioned API keys. Are they secure?

These API keys are required to be able to authenticate on Algolia Docsearch. They are read only and are already public as they are included in the various documnetation site sources, that implements Algolia DocSearch. You can see them in all the requests sent to Algolia. (just check the "Network" tab in your browser console).

Author

👤 Bruno Paz

💛 Support the project

If this project was useful to you in some form, I would be glad to have your support. It will help to keep the project alive and to have more time to work on Open Source.

The sinplest form of support is to give a ⭐️ to this repo.

You can also contribute with GitHub Sponsors.

GitHub Sponsors

Or if you prefer a one time donation to the project, you can simple:

Buy Me A Coffee

Credits

This extension doesn´t scrape or index any documentation on their own. It simply uses public available endpoints provided by the different documentation sites.

This project wouldn´t be possible without Algolia Docsearch, DevDocs, MkDocs and all the websites building their docs portals using these technologies.

📝 License

Copyright © 2023 Bruno Paz.

This project is MIT licensed.

Search icons created by Vectors Market - Flaticon

About

VSCode Extension that allows to search on documnetation sites powered by Algolia DocSearch or MkDocs, directly from your VSCode

Resources

License

Stars

Watchers

Forks

Packages

No packages published