Skip reading the content of the file once front matter is parsed #133
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, thanks for the great library.
I was wondering if there is a way to configure gray-matter to skip reading large content of files with front matter once it found the front matter?
I'm dealing with large MDX files with significant amount of content which delay the load metrics. Happy to hear a work-around as well 🙏
Do you know if this is a feature of the library? I was also wondering the same thing for performance, since I'm only interested in the frontmatter values.
NodeJS seems to support line-by-line reading: https://nodejs.org/api/readline.html#readline_example_read_file_stream_line_by_line
Looks like I'll just use that and use a yaml parser