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?
optionalindexName?:string
Defined in: packages/docs/src/docs.ts:37
Names the vector index in the browser's storage. Default docs.
meaning?
optionalmeaning?:boolean
Defined in: packages/docs/src/docs.ts:35
Search by meaning, with the reader's embedding model. Default true.
navigate?
optionalnavigate?: (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
search?
optionalsearch?: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?
optionalstorage?:VectorStorage
Defined in: packages/docs/src/docs.ts:39
Where vectors are kept. Default IndexedDB (memory when the browser has none).
version?
optionalversion?: () =>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