Skip to content
Pitlane

loaders

Functions

file()

ts
function file(fileName, options?): ContentLoader;

Reads one file holding many entries.

Every entry is data rather than a document: a file of records has no body to render, so render() on one of these entries is a mistake and says so.

Parameters

fileName

string

options?
parser?

Parser

Returns

ContentLoader


glob()

ts
function glob(options): ContentLoader;

Reads every file a pattern matches as one entry.

pattern is an ordinary runtime value — computed, read from the environment, or assembled in a loop — because nothing about it is read statically.

Parameters

options
base?

string

generateId?

(options) => string

pattern

string | string[]

satteri?

CompileOptions

Returns

ContentLoader