@hoast/process-frontmatter

3.1.0 • Public • Published

@hoast/process-frontmatter

Extract frontmatter from text.

Install

npm install @hoast/process-frontmatter

Options

  • {String} property = 'contents' Dot notation path to the data property from which frontmatter should be read.

  • {String} frontmatterProperty = 'frontmatter' Dot notation path to the data property to which the extracted frontmatter should be written.

  • {String} fence = '---' The text which marks the start and end of the frontmatter portion.

  • {Function} parser = JSON.parse Function which parses the extracted frontmatter text.

  • {Function} filter = null Custom filter function. The item data is given as the parameter. Return true if it should be processed, return false if this processor should be skipped.

  • {Number} logLevel = 2 Log level given to the logger.

/@hoast/process-frontmatter/

    Package Sidebar

    Install

    npm i @hoast/process-frontmatter

    Weekly Downloads

    4

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    4.67 kB

    Total Files

    6

    Last publish

    Collaborators

    • redkenrok