Skip to content

extractFAQ

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/lib/structured-data.ts

A page is an FAQ when its type says so, or heuristically when ≥3 of its section headings end with a question mark. Answers are the plain-texted section bodies, capped so we make claims, not dump pages.

Signature

ts
function extractFAQ(markdown: string, pageType: string | null | undefined): FaqSchema | null

Parameters

NameType
markdownstring
pageType`string

Returns: FaqSchema | null

Was this page helpful?

Download as PDF