File parsed types
Context type for the file:parsed hook fired after a file parser runs.
import type { FileParsedContext } from 'comark-content'FileParsedContext
Payload for file:parsed. Handlers may mutate file.data, transform field values, validate against a schema, or set file to null to reject the document.
interface FileParsedContext {
sourceName: string
source: Source
file: ContentFile | null
}| Field | Description |
|---|---|
file | The parsed file. Set to null to exclude it from the manifest during load. |
The markdown-fields and schema-validation plugins both hook file:parsed.