PageFrontmatter #

Frontmatter of a page. KawaPress keeps the data open, so any key an author writes is allowed and typed unknown. A plugin that reads a key declares it from its own package, which gives every reader the exact type:

Fields #

commentsoptionalboolean

false hides the comment section of this page.

feedoptionalboolean

false leaves this page out of the feeds.

dateoptionalstring

Publication date as a quoted string, for example "2026-11-20".

authoroptionalstring | { name: string; email?: string; link?: string }

Author name, or an object with name, email and link.

imageoptionalstring

Cover image: a site path such as /images/cover.png, or an absolute URL.

imageZoomoptionalboolean

false turns image zoom off for every image of this page.

lastUpdatedoptionalstring | boolean

false hides the last updated time of this page. A page a plugin adds has no git history, so it shows a time only when this is a date string.

editLinkoptionalstring | boolean

false hides the edit link of this page. A page a plugin adds has no source file, so it shows an edit link only when this is an absolute URL.

llmsoptionalboolean

false leaves this page out of .md, llms.txt and llms-full.txt.

llmsTxtoptionalstring

Description used in llms.txt instead of the page description.

orderoptionalnumber

Position of this page in llms.txt; lower numbers come first.

ogImageoptionalboolean

false skips the share image of this page.

searchoptionalboolean

false keeps this page out of the search index.

sitemapoptionalboolean

false leaves this page out of sitemap.xml.

layoutoptionalNagiPageLayout

doc (default), home for a landing page, page for a plain page, the name of a globally registered component, or false for the page alone.

navbaroptionalboolean

false hides the navigation bar of this page.

sidebaroptionalboolean

false hides the sidebar of this page.

asideoptionalboolean

false hides the outline column on wide screens.

outlineoptionalboolean

false turns every outline off for this page.

footeroptionalboolean

false hides the footer of home and page layouts.

pageClassoptionalstring

CSS class added to the page shell.

herooptionalNagiHomeHero

Hero block of a home page.

featuresoptionalNagiHomeFeature[]

Feature cards of a home page.

titleoptionalstring

Page title. Without it, the first level-1 heading is used.

descriptionoptionalstring

Page description, used for <meta name="description">.

titleTemplateoptionalstring | false

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

headoptionalHeadConfig[]

Tags added to the <head> of this page only.

[key: string]unknown

Any other key an author writes.

Notes #

TypeScript
declare module 'kawapress' {
  interface PageFrontmatter {
    comments?: boolean
  }
}

The keys are optional because the value comes from the author. Check it at runtime before trusting it.

Full type signature
TypeScript
interface PageFrontmatter {
  comments?: boolean
  feed?: boolean
  date?: string
  author?: string | { name: string; email?: string; link?: string }
  image?: string
  imageZoom?: boolean
  lastUpdated?: string | boolean
  editLink?: string | boolean
  llms?: boolean
  llmsTxt?: string
  order?: number
  ogImage?: boolean
  search?: boolean
  sitemap?: boolean
  layout?: NagiPageLayout
  navbar?: boolean
  sidebar?: boolean
  aside?: boolean
  outline?: boolean
  footer?: boolean
  pageClass?: string
  hero?: NagiHomeHero
  features?: NagiHomeFeature[]
  title?: string
  description?: string
  titleTemplate?: string | false
  head?: HeadConfig[]
  [key: string]: unknown
}

Edit this page

Comments