PageData #

The data of a page that reaches the browser: its route, title, headings and frontmatter.

Fields #

pathstring

Route path of the page, without the site base.

titlestring

Page title.

descriptionoptionalstring

Page description.

titleTemplateoptionalstring | false

Template for <title>, where %s is the page title; false shows the page title alone.

headoptionalHeadConfig[]

<head> tags from frontmatter, rendered after site and locale tags.

frontmatterPageFrontmatter

The frontmatter of the page.

headersPageHeader[]

The headings of the page, nested by level.

Full type signature
TypeScript
interface PageData {
  path: string
  title: string
  description?: string
  titleTemplate?: string | false
  head?: HeadConfig[]
  frontmatter: PageFrontmatter
  headers: PageHeader[]
}

Edit this page

Comments