MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getPageTitle

Function getPageTitle

packages/dev/s2-docs/src/searchUtils.tsx:463–465  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

461}
462
463export function getPageTitle(page: Page): string {
464 return page.exports?.title ?? page.tableOfContents?.[0]?.title ?? page.name;
465}
466
467/**
468 * Gets the search section for a page, preferring `searchSection` over `section`.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected