front_matter_ml library
Extracts YAML front matter from a file.
Classes
- FrontMatterDocument
-
Document containing the original
value, front matterdataandcontent.
Constants
- fileNotFoundError → const String
- Error message for when file is not found.
- fileTypeError → const String
- Error message for when the file type is unsupported.
- invalidYamlError → const String
- Error message for invalid YAML.
Functions
-
parse(
String text, {String delimiter = _defaultDelimiter}) → FrontMatterDocument -
Parses a
textstring to extract the front matter. -
parseFile(
String path, {String delimiter = _defaultDelimiter}) → Future< FrontMatterDocument> -
Reads a file at
pathand parses the content to extract the front matter.
Exceptions / Errors
- FrontMatterException
- Exception thrown when there's an internal error.