Skip to main content

Layout Frontmatter Config

About 2 minConfigFrontmatterLayout

You can configure page layout by setting the following frontmatter options.

pageInfo

  • Type: PageInfo[] | false
  • Default value: value in theme options
ItemCorresponding ContentPage frontmatter Value
"Author"Authorauthor
"Date"Writing Datedate
"Category"Categorycategory
"Tag"Tagstag
"ReadingTime"Expect reading timeN/A (automatically generated)
"Word"Word countN/A (automatically generated)
"PageView"Visit Numberpageview (only available with Waline)

Set whether to show page details on the current page

pageview

  • Type: boolean
  • Default value: value in theme options

Whether display page views.

Tips

The pageview feature requires you to have a valid Waline Comment Service config.

  • Type: boolean
  • Default value: value in theme options

Whether path navigation is enabled on the current page.

  • Type: boolean
  • Default value: value in theme options

Whether path navigation icon is enabled on the current page.

  • Type: boolean

The navbar configuration of the page, filling in false will disable the navbar

  • Type: "heading" | false

Page sidebar configuration options. Supports "heading" or false.

headerDepth

  • Type: number
  • Default: 2

The page's sidebar heading rendering depth.

index

  • Type: boolean
  • Default: true

Whether index current page in sidebar and catalog.

order

  • Type: number

Page order in sidebar and catalog.

  • By filling in a positive number, the page will appear in the front, while the smaller number comes to the front.
  • By filling in a negative number, the page will appear in the end, while the greater number comes to the front. (e.g. -1 is after -2)

dir

Sidebar group information used for structure sidebar.

dir.text

  • Type: string
  • Default: title of README.md

Group title.

dir.icon

  • Type: string
  • Default: icon of README.md

Group icon.

dir.collapsible

  • Type: boolean
  • Default: true

Whether group is collapsible

  • Type: boolean
  • Default: false

Whether Dir is clickable.

Note

Setting to true means setting group link to link of README.md.

dir.index

  • Type: boolean
  • Default: true

Whether index current dir

dir.order

  • Type: number

Group order in sidebar.

  • By filling in a positive number, the page will appear in the front, while the smaller number comes to the front.
  • By filling in a negative number, the page will appear in the end, while the greater number comes to the front. (e.g. -1 is after -2)

comment

  • Type: boolean
  • Default value: value in theme options

Whether to enable comments on the current page.

lastUpdated

  • Type: boolean
  • Default value: value in theme options

Whether display lastUpdated time.

  • Type: boolean
  • Default value: value in theme options

Whether to show edit link.

contributors

  • Type: boolean
  • Default value: value in theme options

Whether to show contributors.

prev

  • Type: AutoLinkOptions | string | false

    interface AutoLinkOptions {
      text: string;
      icon: string;
      link: string;
    }
    

Previous article link.

next

  • Type: AutoLinkOptions |string | false

    interface AutoLinkOptions {
      text: string;
      icon: string;
      link: string;
    }
    

Next article link.

  • Type: boolean | string | HTMLString
  • Default value: the value configured globally

Footer content.

  • Set it to an empty string if you want an empty content
  • Set it to false to disable the footer
  • Set it to true to display the default footer

For more details, please see Page → Footer Support.

  • Type: string | false
  • Default value: value in theme options

Copyright information

For more details, please see Page → Footer Support.

backToTop

  • Type: boolean
  • Default value: true

Whether display the back to top button.

toc

  • Type: boolean
  • Default value: value in theme options

Whether display toc in desktop mode.

containerClass

  • Type: string
  • Required: No

Extra container class.

layout

  • Type: string
  • Default: "Layout"

Page custom layout name.