---
title: PageRenderer
description: >-
  Renders one kind of page, chosen from the page's frontmatter: an endpoint from
  `operation`, a symbol from `symbol`, a wiki article from `infobox`.
updated_at: '2026-11-11T10:16:38+01:00'
created_at: '2026-10-27T19:43:15+01:00'
symbol:
  kind: interface
  name: PageRenderer
  signatures:
    - interface PageRenderer<T = unknown>
  typeParameters:
    - name: T
      default: unknown
  members:
    - name: id
      kind: property
      signature: 'readonly id: string'
    - name: detect
      kind: method
      signature: >-
        readonly detect(properties: Properties, entry:
        [[reference/api/core/IndexEntry|IndexEntry]]): T | undefined
      description: >-
        The page's data when this renderer renders it, else `undefined`. Throw
        with a reason when its metadata is invalid.
    - name: body
      kind: property
      signature: >-
        readonly body:
        Component<[[reference/api/theme-minimal/runtime/RendererProps|RendererProps]]<T>>
      description: 'The page''s main column: its own header, then `children`.'
    - name: aside
      kind: property
      signature: >-
        readonly aside?:
        Component<[[reference/api/theme-minimal/runtime/RendererProps|RendererProps]]<T>,
        {}, string>
      description: >-
        Replaces the right column; without one, the page gets the theme's right
        column.
    - name: explorerItem
      kind: method
      signature: >-
        readonly explorerItem?(data: T, entry:
        [[reference/api/core/IndexEntry|IndexEntry]]):
        [[reference/api/ui/ExplorerItem|ExplorerItem]]
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/themes/minimal/src/lib/extension.ts#L98
---

# PageRenderer

```ts
const webhooks = definePageRenderer({
  id: 'webhook',
  detect: (properties) => isRecord(properties.webhook) ? readWebhook(properties.webhook) : undefined,
  explorerItem: (hook) => ({ badge: { label: 'HOOK', hue: 'orange' }, label: hook.event }),
  body: WebhookPage,
  aside: WebhookExamples
});
```
