Collections Reference
lilypondLoader(), imported from astro-lilypond/loader, accepts the following options.
lilypondLoader() Options
Section titled “lilypondLoader() Options”Type: string | URL
Required: yes
The directory pattern resolves from. Relative to the project root.
pattern
Section titled “pattern”Type: string | string[]
Default: "**/*.{ly,ily,lilypond}"
Glob pattern(s) matching score files, relative to base.
generateId
Section titled “generateId”Type: (options: { entry: string; base: URL; header: Record<string, string> }) => string
Default: the file’s path relative to base, with its extension stripped (e.g. preludes/prelude-1.ly becomes preludes/prelude-1).
Generates each entry’s collection id. header is the file’s parsed \header fields, so you can key ids off metadata instead of the file path if you’d like.
LilypondCollectionEntry type
Section titled “LilypondCollectionEntry type”interface LilypondCollectionEntry { source: string; alt: string; sourceName?: string; includePaths: string[]; assetTitle: string; meta: LilypondMetadata;}