Options
All
  • Public
  • Public/Protected
  • All
Menu

Module mdx

Index

Type aliases

MdxPath

MdxPath: { params: { fileName: String[] } }

Type declaration

  • params: { fileName: String[] }
    • fileName: String[]

Functions

getFiles

  • getFiles(dir: string): any
  • Generator returning paths of all files in the folder and its subfolders

    Parameters

    • dir: string

    Returns any

getFirstHeader

  • getFirstHeader(mdText: string): string | undefined
  • extract the first header out of the mdx to use for autogeneration of head tags

    Parameters

    • mdText: string

    Returns string | undefined

getMdxPaths

  • getMdxPaths(docsDir: string): Promise<MdxPath[]>
  • Get all MD/MDX files paths on a folder and his subfolder. Returns an array of {params: {fileName: [ 'exampleSubFolder', 'exampleFile' ]}

    Parameters

    • docsDir: string

    Returns Promise<MdxPath[]>

getSource

  • getSource(docFolder: string, fileNames: [string]): Promise<{ filePath: string; source: string }>
  • Parameters

    • docFolder: string
    • fileNames: [string]

    Returns Promise<{ filePath: string; source: string }>

Const listMdxFiles

  • listMdxFiles(__namedParameters: ListMdxFileArgs): Promise<MdxFile[]>
  • Get all MD/MDX files of a folder, in order to generate indexes without imports

    Parameters

    • __namedParameters: ListMdxFileArgs

    Returns Promise<MdxFile[]>

Generated using TypeDoc