I hereby claim:
- I am benhinchley on github.
- I am benhinchley (https://keybase.io/benhinchley) on keybase.
- I have a public key ASAW1e5PDmfZTz2Vn2AJLukmF-wIZgzcbFKAnTvj6N2FVgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = tab | |
tab_width = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
// 1. Assumes the following div exists in the page, note: you can change this using the "attachDynamicContent" setting | |
// <div id="dynamic-content"></div> | |
// 2. The "pipeline" parameter controls the query execution, this example uses "popular", this is configurable | |
// 3. The "values" map controls the query. You don't need the "q" parameter, but can use this to control the context of | |
// the results. For example you may wish to use the "document.title" to find related content to the current page | |
// 4. The filter parameter allows any number of filters to be used to filter the query results, e.g. to domains, or sections, | |
// or any other number of factors | |
var recommend = setup(window, document, "script", "sajari", "//cdn.sajari.net/js/integrations/website-search-1.4.js"); | |
recommend({ |
/* | |
Removing this rule, achieves the same result as adding 10px padding to the following selector .top-search-form input[placeholder="Search"] | |
*/ | |
.top-search-form input { | |
position: absolute; | |
background: none; | |
top: 0; | |
left: 0; | |
} |
<script> | |
var getUrlParam = function (e) { var t = new RegExp("[?&]" + e.replace(/[\[\]]/g, "\\$&") + "(=([^&#]*)|&|#|$)"), a = t.exec(window.location.href); return a && a[2] ? decodeURIComponent(a[2].replace(/\+/g, " ")) : "" }; | |
var setup = function (c, a, f) { function g() { var a = [], b = function () { a.push(arguments) }; b.arr = a; c.sajari = c.sajari || {}; c.sajari.ui = c.sajari.ui || []; c.sajari.ui.push(b); return b } var e = a.createElement("script"); e.async = !0; e.src = f; var d = a.createElement("link"); d.as = "script"; d.rel = "preload"; d.crossorigin = !0; d.href = f; a.head.appendChild(d); a.head.appendChild(e); a = g(); a.init = function (a) { var b = g(); b(a); return b }; return a }; | |
var sajari = setup(window, document, "//cdn.sajari.net/js/integrations/website-search-1.4.js"); | |
var searchBox = sajari.init({ | |
mode: "search-box", | |
project: "1534384424562720477", // Set this to your project. | |
collection: "triblive-com", // Set this to your collection |
/* fixing the text alignment and suggestions container width */ | |
#nav-search-box ul, | |
#results-search-box ul { | |
margin: 0; | |
padding: 0; | |
text-align: left; | |
} |
<?php | |
/* | |
// createLocationFilter generates the location filter based on the | |
// location matching matrix provided by careerone | |
func createLocationFilter(locationLevel int, locations []int) string { | |
filterSegmentFmt := "(location_level_%[1]d = %[2]d OR location_level_%[1]d = 0)" | |
s := make([]string, 0, len(locations)) | |
for i := locationLevel; i < len(locations)+1; i++ { |
The following Javascript code block should be placed in the <head />
of your global page template.
<script>
(function() {
function setup(c,a,f){function g(){var a=[],b=function(){a.push(arguments)};b.arr=a;c.sajari=c.sajari||{};c.sajari.ui=c.sajari.ui||[];c.sajari.ui.push(b);return b}var d=a.createElement("link");d.href=f;d.as="script";d.rel="preload";d.crossorigin=!0;var e=a.createElement("script");e.async=!0;e.src=f;a.head.appendChild(d);a.head.appendChild(e);a=g();a.init=function(a){var b=g();b(a);return b};return a};
const sajari = require("@sajari/sdk-node") | |
const SajariProject = "<your-project>"; | |
const SajariCollection = "<your-collection>"; | |
const SajariCredentials = { | |
key: "<your-api-key>", | |
secret: "<your-api-secret>" | |
}; | |
// create client |