sajari-website
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "sajari-website", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Website extensions for the Sajari API. Automatically index site content, add user profiles, render search and recommendations, etc.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -1,4 +0,4 @@ | ||
# Sajari Search API Client for JavaScript | ||
# Sajari Website integration (HTML & JavaScript) | ||
[Sajari Search](https://www.sajari.com) is a hosted search and recommendation service supporting instant search, various recommendations widgets and automatic content indexing. | ||
[Sajari Search](https://www.sajari.com) is a hosted search and recommendation service supporting instant search, various recommendations widgets and automatic content indexing. | ||
@@ -16,2 +16,11 @@ [license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square | ||
#### Install | ||
To install: | ||
##### NPM | ||
``` | ||
npm install sajari-website --save | ||
``` | ||
This module is designed for browser integration. It is a wrapper for the base [Sajari API module](https://www.npmjs.com/package/sajari) that automatically integrates several key functions: | ||
@@ -25,3 +34,3 @@ | ||
### Rendering HTML widgets | ||
### Rendering HTML search widgets | ||
@@ -33,2 +42,3 @@ - Simple HTML markup can be used to create powerful search or recommendation integrations | ||
Example: | ||
Simple search integration using an overlay to display results: | ||
@@ -40,2 +50,3 @@ ```html | ||
Example: | ||
Search integration displaying 5 results within the page (note: results can be placed anywhere): | ||
@@ -47,3 +58,14 @@ ```html | ||
Advanced example: | ||
Search integration favouring recent and local results, filtering to show only the "bike" category, | ||
displaying within the page (note: results can be placed anywhere): | ||
```html | ||
<input type="search" data-sj-search-query data-sj-search-recent data-sj-local data-sj-filter="category,bike" /> | ||
<div data-sj-search-results ></div> | ||
``` | ||
### Rendering HTML recommendations widgets | ||
Example: | ||
Related (to current page) recommendations integration: | ||
@@ -54,10 +76,16 @@ ```html | ||
Advanced example: | ||
Search integration favouring recent and local results, filtering to show only the "bike" category, | ||
displaying within the page (note: results can be placed anywhere): | ||
Example: | ||
Popular (site wide) recommendations integration: | ||
```html | ||
<input type="search" data-sj-search-query data-sj-search-recent data-sj-local data-sj-filter="category,bike" /> | ||
<div data-sj-search-results ></div> | ||
<div data-sj-popular></div> | ||
``` | ||
Example: | ||
Related recommendations integration with 3 results, limited to pages where the URL contains "comedy", favour local results (works if pages have a lat-lng): | ||
```html | ||
<div data-sj-related data-sj-local data-sj-maxresults="3" data-sj-filters="~url,comedy"></div> | ||
``` | ||
### JavaScript API functionality | ||
@@ -67,1 +95,2 @@ | ||
- See more information on [JavaScript functionality](https://www.sajari.com/javascript-plugin) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49322
90