TemplateData

interface
interface TemplateData

Template data model passed to Eta per-item templates as it.

PROPERTIES

NAMETYPEDESCRIPTION
description?stringExample description
filesExampleFile[]Example files
helpers{ codeBlock: (contents: string, language?: string, attributes?: Record<string, string>) => string; createFileAccessor: (file: ExampleFile, title?: string) => FileAccessor; filesByExt: (files: ExampleFile[], ext: string) => ExampleFile[]; hunkDescription: (metadata: Record<string, unknown>, hunkId: string) => string | undefined; isProseFile: (file: ExampleFile) => boolean; langFromPath: (filePath: string) => string; region: (files: ExampleFile[], regionId: string) => { content: string; file: ExampleFile } | undefined; slugify: (text: string) => string }Template helper functions
idstringExample unique identifier
metadataRecord<string, unknown>Full metadata object
renderedProsestring[]Prose files rendered through Eta (with file/region helpers expanded)
titlestringExample title
unconsumedFilesExampleFile[]Files not consumed by prose helpers β€” the "remaining" code files