Options
All
  • Public
  • Public/Protected
  • All
Menu

Module DocHelpers

Index

Type aliases

IDocMetadata

IDocMetadata: Readonly<Record<string, string>>

Functions

GetFrontMatter

  • Pull out the frontmatter from a MD source and return a k-v map.

    NOTE! This does not support YAML, it only fakes it by pulling out simple key-values. Use a front-matter parser if you need true YAML support.

    If this function couldn't parse the front-matter or the document didn't have one, then this will return null.

    export

    Parameters

    • src: string

      The markdown source file

    Returns IDocMetadata | null

    A kv map of front-matter params, or null.

StripFrontMatter

  • StripFrontMatter(src: string): string

Generated using TypeDoc