Skip to main content

Interface: DocsOptions

Defined in: packages/docs/src/docs.ts:18

Properties​

corpus​

corpus: DocsCorpus | (() => Promise<DocsCorpus>)

Defined in: packages/docs/src/docs.ts:20

The corpus, or how to fetch it (called once, when first needed).


indexName?​

optional indexName?: string

Defined in: packages/docs/src/docs.ts:37

Names the vector index in the browser's storage. Default docs.


meaning?​

optional meaning?: boolean

Defined in: packages/docs/src/docs.ts:35

Search by meaning, with the reader's embedding model. Default true.


optional navigate?: (url) => void

Defined in: packages/docs/src/docs.ts:25

Show a page to the reader. Default: location.assign. Single-page sites pass their router's navigation.

Parameters​

url​

string

Returns​

void


optional search?: SiteSearch

Defined in: packages/docs/src/docs.ts:33

The site's own search, searched with Leuria's (by words, over the corpus): its hits on the corpus's pages are merged in. Leuria's alone answers when it fails.


storage?​

optional storage?: VectorStorage

Defined in: packages/docs/src/docs.ts:39

Where vectors are kept. Default IndexedDB (memory when the browser has none).


version?​

optional version?: () => string | undefined

Defined in: packages/docs/src/docs.ts:27

The docs version the reader is on (versioned docs). Default: the version of the page open, else the corpus's default.

Returns​

string | undefined