Skip to content

TypeScript API / laikacms/assets/obsidian / ObsidianAssetsRepositoryOptions

Interface: ObsidianAssetsRepositoryOptions ​

Configuration for ObsidianAssetsRepository.

Properties ​

attachmentsDirectory? ​

ts
optional attachmentsDirectory?: string;

Subdirectory of the vault treated as the asset root — e.g. Obsidian's configured attachments folder. Asset keys are resolved relative to it. Defaults to the vault root.


createUrl? ​

ts
optional createUrl?: (key) => string;

Builds a serving URL for an asset key. Defaults to returning the key unchanged — supply this to point at a static host or CDN.

Parameters ​

ParameterType
keystring

Returns ​

string


createVariations? ​

ts
optional createVariations?: (key) => Record<string, AssetVariation>;

Returns the variation map for an asset key. Variation values follow the AssetVariation shape. Return {} (the default) to indicate no variations.

Parameters ​

ParameterType
keystring

Returns ​

Record<string, AssetVariation>


documentExtensions? ​

ts
optional documentExtensions?: string[];

File extensions (without the leading dot) excluded from listings and lookups because they belong to the documents layer. Defaults to ['md'].


ignore? ​

ts
optional ignore?: string[];

Directory / file basenames skipped while listing. Defaults to Obsidian and VCS housekeeping entries.

Released under the MIT License.