Module

x/lume/core/searcher.ts>default

🔥 Static site generator for Deno 🦕
Very Popular
Latest
class default
import { default } from "https://dotland.deno.dev/x/lume@v2.3.3/core/searcher.ts";

Search helper

Constructors

new
default(options: Options)

Methods

data<T>(path?): T & Partial<Data> | undefined

Return the data in the scope of a path (file or folder)

Clear the cache (used after a change in watch mode)

files(globOrRegexp?: RegExp | string): string[]

Search files using a glob

nextPage<T = unknown>(
url: string,
query?: string,
sort?: string,
): Data & T | undefined

Return the next page of a search

page<T>(query?: string, sort?: string): Data & T | undefined

Search and return the first page

pages<T>(
query?: string,
sort?: string,
limit?: number,
): (Data & T)[]

Search pages

previousPage<T = unknown>(
url: string,
query?: string,
sort?: string,
): Data & T | undefined

Return the previous page of a search

values<T = unknown>(key: string, query?: string): T[]

Returns all values from the same key of a search