Global Computed

In KduPress, some core computed properties (opens new window) can be used by the default theme or custom themes. Or in Markdown pages using kdu.

$site

This is the $site value of the site you’re currently reading:

{
  "title": "KduPress",
  "description": "Kdu-powered static site generator",
  "base": "/",
  "pages": [
    {
      "lastUpdated": 1524027677000,
      "path": "/",
      "title": "KduPress",
      "frontmatter": {}
    },
    ...
  ]
}

$page

This is the $page value of the page you’re currently reading:

{
  "title": "Global Computed",
  "frontmatter": {},
  "regularPath": "/guide/global-computed.html",
  "key": "v-d4cbeb69eff3d",
  "path": "/guide/global-computed.html",
  "headers": [
    {
      "level": 2,
      "title": "$site",
      "slug": "site"
    },
    {
      "level": 2,
      "title": "$page",
      "slug": "$page"
    },
    ...
  ]
}

$frontmatter

Reference of $page.frontmatter.

$lang

The language of the current page. Default: en-US.

For more information, see Internationalization.

$localePath

The locale path prefix for the current page. Default: /.

For more information, see Internationalization.

$title

Value of the <title> label used for the current page.

$description

The content value of the <meta name= "description" content= "..."> for the current page.

$themeConfig

Refers to siteConfig.themeConfig.