
Usage
HTML
Available parameters
Multiple git branches
If you’ve set up the plugin to index multiple branches using thebranches option,
each configured branch has a dedicated index.
You also need to pass the information of which index you want to search in using the branch parameter of the integration.
To get access to the currently building branch,
you can configure your build tool to forward the HEAD environment variable.
For instance, with webpack’s environment plugin configured to forward HEAD, you would pass branch: process.env.HEAD.
If you’ve configured your plugin to index only specific branches, you need to duplicate the logic here so that it picks the correct branch only when appropriate.
You can also use wildcards in the branch names.
For instance, with branches = ['main', 'develop', 'feat/*'], and using webpack’s environment plugin to inject HEAD, here’s how the snippet could look like:
JavaScript
Theme
You can theme the input and the autocomplete by using thetheme property.
JavaScript
