PageComponentEnv #

Part of the Markdown env that carries the page components.

Fields #

pathoptionalstring

Public route of the page being rendered. Only used in error messages.

pageComponentsoptionalPageComponent[]

The components the page has declared so far. KawaPress reads them after rendering.

[key: string]unknown

The Markdown env of markdown-it and markdown-exit carries every value a plugin writes. Accepting that shape here lets a plugin pass the env it receives straight to addPageComponent().

Full type signature
TypeScript
interface PageComponentEnv {
  path?: string
  pageComponents?: PageComponent[]
  [key: string]: unknown
}

Edit this page

Comments