...
To configure your website to use the CDN, simply 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 | ||
---|---|---|
| ||
interface HawksearchConfig {
clientId: string;
breakpoints?: {
tablet: number;
desktop: number;
};
css?: {
customStyles?: string | Array<string>;
defaultStyles?: boolean;
};
endpoints?: {
search: string;
tracking: string;
};
fieldMappings?: {
description?: string;
imageUrl?: string;
price?: string;
salePrice?: string;
title?: string;
type?: string;
url?: string;
};
formatting?: {
cultureIsoCode?: string;
currencyIsoCode?: string;
};
placeholderImageUrl?: string;
queryStringMappings?: {
disableSpellcheck?: string;
facet?: string;
page?: string;
pageSize?: string;
query?: string;
searchWithin?: string;
sort?: string;
};
templates?: HawksearchTemplates;
trackingEnabled?: boolean;
urlPrefixes?: {
assets?: string;
content?: string;
};
} |
...