A lightweight search integration for using Sajari as simple embedded widgets. It is a wrapper of our React SDK.
See the configuration reference documentation for available configuration options and examples.
- Run
yarnto install the dependencies - Run
yarn startto start the development build and serve the preview - Open http://localhost:8080
- Edit the props on the left to see the changes on the preview on the right
Create the following HTML and add your props object from the preview:
<div data-widget="search-ui">
<script type="application/json">
{YOUR PROPS OBJECT}
</script>
</div>Deployment is handled using Atlassian changesets. To create a new release, your change/PR must have an associated changeset. To create one, run yarn changeset.
You should never need to manually deploy, but if you do:
yarn deploywill create a production build, using the version from the package.json and deploy to GCS (cdn.sajari.com/embed).yarn deploy:loader-onlywill update the major-version loader.js (e.g./1/loader.js) to point to the version in package.json.yarn deploy:fullwill do a full deployment of all files and point the major version loader to the current version in package.json. Essentially, it's a shortcut foryarn deploy && yarn deploy:loader-only.yarn deploy:stagingwill deploy both the loader and built files to a staging environment (cdn.sajari.com/embed/staging).