Function mdsite::file_scan::load_frontmatter[][src]

pub fn load_frontmatter<T: DeserializeOwned>(
    files: Vec<MarkdownPath>
) -> Result<Vec<MarkdownData<T>>, Error>

Collects parsed metadata from each file. If there are any errors reading the file (such as file permission problems), returns an Error. Does not return errors immediately if frontmatter isn't parsed correctly (such as missing required fields, or other syntax errors). Each frontmatter returned is a Result containing successful parsed object or an error for that file. This can be used to display file-specific error messages if desired.