@bridgeline-digital/hawksearch-handlebars-ui
v6.2.3
Published
The HawkSearch Handlebars UI package allows you to add a highly-customizable search results page to your website powered by HawkSearch.
Downloads
886
Keywords
Readme
HawkSearch Handlebars UI
The HawkSearch Handlebars UI package allows you to add a highly-customizable search results page to your website powered by HawkSearch.
Getting Started
- Run
npm install --save @bridgeline-digital/hawksearch-handlebars-ui
- Modify your HTML by importing the HawkSearch Handlebars UI script file and adding the appropriate HTML elements.
<!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="module" src="node_modules/@bridgeline-digital/hawksearch-handlebars-ui/dist/hawksearch-handlebars-ui.min.js"></script>
<script type="text/javascript">
addEventListener('hawksearch:loaded', () => {
HawkSearch.init({
clientId: 'YOUR_CLIENTID_HERE'
});
});
</script>
</head>
<body>
<h1>HawkSearch Handlebars UI</h1>
<hawksearch-search-field></hawksearch-search-field>
<hawksearch-search-results></hawksearch-search-results>
</body>
</html>
To display a landing page or recommendations instead of search results, simply replace <hawksearch-search-results></hawksearch-search-results>
with <hawksearch-landing-page></hawksearch-landing-page>
or <hawksearch-recommendations widget-id="YOUR_WIDGETID_HERE"></hawksearch-recommendations>
.
Documentation
Documentation is available at http://handlebars-ui.hawksearch.com/latest/.