Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. If your website does not already have a package.json file in the root, run npm init to generate one.

  2. Run npm install --save @bridgeline-digital/hawksearch-handlebars-ui to install the latest version.

  3. Update your HTML to import the script file, set your Configuration, and add the appropriate elements to your page. Below is a basic sample implementation:

    Code Block
    languagehtml
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>Hawksearch Handlebars UI</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script type="text/javascript">
          var Hawksearch = Hawksearch || {};
    
          Hawksearch.config = {
            clientId: "f51060e1c38446f0bacdf283390c37e8"
          };
        </script>
        <script src="node_modules/@bridgeline-digital/hawksearch-handlebars-ui/dist/hawksearch-handlebars-ui.js" defer></script>
      </head>
    
      <body>
        <h1>Hawksearch Handlebars UI</h1>
        <hawksearch-search><search-field></hawksearch-search-search>field>
        <hawksearch-search-results></hawksearch-search-results>
      </body>
    </html>

...