deno.land / x / lume@v2.1.4 / plugins / search.ts
123456789101112131415161718192021222324252627282930313233343536import { merge } from "../core/utils/object.ts";
import type Site from "../core/site.ts";import type Searcher from "../core/searcher.ts";
export interface Options { /** The helper name */ name?: string;}
export const defaults: Options = { name: "search",};
/** Register the plugin to enable the `search` helpers */export default function (userOptions?: Options) { const options = merge(defaults, userOptions);
return (site: Site) => { site.data(options.name, site.search); };}
/** Extends Data interface */declare global { namespace Lume { export interface Data { /** * The searcher helper * @see https://lume.land/plugins/search/ */ search: Searcher; } }}
Version Info