Function
renderPage
(
active: ActiveSection,
content: unknown,
metadata: PageMetadata = DEFAULT_PAGE_METADATA,
)
Source from the content-addressed store, hash-verified
| 459 | } |
| 460 | |
| 461 | function renderPage( |
| 462 | active: ActiveSection, |
| 463 | content: unknown, |
| 464 | metadata: PageMetadata = DEFAULT_PAGE_METADATA, |
| 465 | ): RenderedPage { |
| 466 | return { |
| 467 | html: renderToString( |
| 468 | <Fragment> |
| 469 | <Header active={active} /> |
| 470 | <main class="page-scroll">{content}</main> |
| 471 | <MobileMenu active={active} /> |
| 472 | <SearchDialog items={SearchItems} /> |
| 473 | <HelpDialog /> |
| 474 | </Fragment>, |
| 475 | ), |
| 476 | metadata, |
| 477 | }; |
| 478 | } |
| 479 | |
| 480 | function modelPageMetadata(model: ModelEntry): PageMetadata { |
| 481 | const metadata = model.metadata; |
Tested by
no test coverage detected