Options
type Options = object;
Defined in: server/config/options.ts:4
Configures server behaviour.
Properties
build
build: "html" | "jsx";
Defined in: server/config/options.ts:23
The type of syntax to build; html by default.
cache
cache: CacheOptions | null;
Defined in: server/config/options.ts:25
Configure build artifacts caching; assign null
to disable caching.
cover?
optional cover: string | null;
Defined in: server/config/options.ts:16
Image source to show while content is loading. When per-asset cover generation is enabled in encode options, will use specified source as a fallback for legacy browsers (lacking avif support), otherwise will use the source for all covers; assign null
to disable covers completely.
encode
encode: EncodeOptions;
Defined in: server/config/options.ts:29
Configure content encoding.
fetch
fetch: FetchOptions;
Defined in: server/config/options.ts:27
Configure remote content fetching.
plugins
plugins: Plugin[];
Defined in: server/config/options.ts:31
External imgit extensions; use to override or extend server behaviour.
regex
regex: RegExp[];
Defined in: server/config/options.ts:12
Regular expressions to use for capturing transformed assets syntax. Expects <url>
, <alt>
and <spec>
capture groups (alt and spec are optional). By default, captures Markdown image syntax with spec defined as query params after alt: !\[(?<alt>.*?)(?<spec>\?\S+?)?]\((?<url>\S+?)\)
root
root: string;
Defined in: server/config/options.ts:7
Local directory under which project's static files are stored. Required to resolve file paths of relative content sources; ./public
by default.
width
width: number | null;
Defined in: server/config/options.ts:21
Default width threshold for the transformed assets, in pixels. When source asset is larger, will downscale it while preserving the original aspect. In case the source is 2x or larger, will as well generate additional "dense" variant that will be shown on high-dpi displays. This option is ignored when asset has width explicitly assigned via spec syntax.