Function frontmatter

  • Parse a frontmatter into a data object and a body string

    Parameters

    • str: string

      input string

    Returns { body: string; data: any }

    a data object and a body string