Skip to content

renderFrontMatter

Render the Starlight frontmatter block (through the closing --- and its blank line) shared by every generated page kind: module index, type overview, property, and method.

Every page kind goes through here so no field can be emitted on some kinds and silently dropped on others. description in particular is not just SEO metadata — it is the line the OG card renders under the title, so a page kind that skipped it produced a title-only card next to fully populated ones.

Import:

import { renderFrontMatter } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-page-generation';

Signature:

function renderFrontMatter(frontMatter: PageFrontMatter): string[]

Parameters:

Parameter Type Description
frontMatter PageFrontMatter The page’s frontmatter fields.

Returns: string[] — The frontmatter lines, through the closing --- and its blank line.