Skip to content

CatalogSchema

cartographer


cartographer / CatalogSchema

Defined in: types/settings.ts:73

Catalog schema definition—defines all available fields for a library.

The schema is the contract between markdown frontmatter and the plugin, specifying what fields exist, their types, and how they should be handled. Different libraries can have different schemas.

const schema: CatalogSchema = {
catalogName: "Pulp Fiction",
fields: [
{ key: 'title', label: 'Title', type: 'string', sortOrder: 1 },
{ key: 'authors', label: 'Authors', type: 'wikilink-array', sortOrder: 2 },
{ key: 'word-count', label: 'Word Count', type: 'number', sortOrder: 3 },
],
coreFields: {
titleField: 'title',
idField: 'title',
statusField: 'catalog-status'
}
};

catalogName: string

Defined in: types/settings.ts:75

Display name for this catalog (e.g., “Pulp Fiction”, “My Library”)


fields: SchemaField[]

Defined in: types/settings.ts:77

Array of field definitions for this catalog (defines all available fields)


coreFields: object

Defined in: types/settings.ts:79

Core fields required for plugin operation

titleField: string

Field key that serves as the display title for items (usually ‘title’)

optional idField: string

Field key that uniquely identifies items (optional; defaults to titleField)

optional statusField: string

Field key that tracks publication/review status (optional)