deno.land / x / lume@v2.1.4 / plugins / search.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { 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; } }}
lume

Version Info

Tagged at
5 months ago