import{_ as n,c as p,ag as t,j as a,a as i,G as l,B as h,o as d}from"./chunks/framework.C1C4sYC0.js";const b=JSON.parse('{"title":"Frontmatter Config","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"reference/frontmatter-config.md","filePath":"en/reference/frontmatter-config.md","lastUpdated":1725197758000}'),o={name:"reference/frontmatter-config.md"},r={id:"hero",tabindex:"-1"},k={id:"features",tabindex:"-1"};function c(g,s,u,y,E,m){const e=h("Badge");return d(),p("div",null,[s[6]||(s[6]=t(`

Frontmatter Config

Frontmatter enables page based configuration. In every markdown file, you can use frontmatter config to override site-level or theme-level config options. Also, there are config options which you can only define in frontmatter.

Example usage:

md
---
title: Docs with VitePress
editLink: true
---

You can access frontmatter data via the $frontmatter global in Vue expressions:

md
{{ $frontmatter.title }}

title

Title for the page. It's same as config.title, and it overrides the site-level config.

yaml
---
title: VitePress
---

titleTemplate

The suffix for the title. It's same as config.titleTemplate, and it overrides the site-level config.

yaml
---
title: VitePress
titleTemplate: Vite & Vue powered static site generator
---

description

Description for the page. It's same as config.description, and it overrides the site-level config.

yaml
---
description: VitePress
---

Specify extra head tags to be injected for the current page. Will be appended after head tags injected by site-level config.

yaml
---
head:
  - - meta
    - name: description
      content: hello
  - - meta
    - name: keywords
      content: super duper SEO
---
ts
type HeadConfig =
  | [string, Record<string, string>]
  | [string, Record<string, string>, string]

Default Theme Only

The following frontmatter options are only applicable when using the default theme.

layout

Determines the layout of the page.

yaml
---
layout: doc
---
`,30)),a("h3",r,[s[0]||(s[0]=i("hero ")),l(e,{type:"info",text:"home page only"}),s[1]||(s[1]=i()),s[2]||(s[2]=a("a",{class:"header-anchor",href:"#hero","aria-label":'Permalink to "hero "'},"​",-1))]),s[7]||(s[7]=a("p",null,[i("Defines contents of home hero section when "),a("code",null,"layout"),i(" is set to "),a("code",null,"home"),i(". More details in "),a("a",{href:"./default-theme-home-page"},"Default Theme: Home Page"),i(".")],-1)),a("h3",k,[s[3]||(s[3]=i("features ")),l(e,{type:"info",text:"home page only"}),s[4]||(s[4]=i()),s[5]||(s[5]=a("a",{class:"header-anchor",href:"#features","aria-label":'Permalink to "features "'},"​",-1))]),s[8]||(s[8]=t(`

Defines items to display in features section when layout is set to home. More details in Default Theme: Home Page.

Whether to display navbar.

yaml
---
navbar: false
---

Whether to display sidebar.

yaml
---
sidebar: false
---

aside

Defines the location of the aside component in the doc layout.

Setting this value to false prevents rendering of aside container.
Setting this value to true renders the aside to the right.
Setting this value to 'left' renders the aside to the left.

yaml
---
aside: false
---

outline

The levels of header in the outline to display for the page. It's same as config.themeConfig.outline.level, and it overrides the value set in site-level config.

yaml
---
outline: [2, 4]
---

lastUpdated

Whether to display last updated text in the footer of the current page. If a datetime is specified, it will be displayed instead of the last git modified timestamp.

yaml
---
lastUpdated: false
---

Whether to display edit link in the footer of the current page.

yaml
---
editLink: false
---

Whether to display footer.

yaml
---
footer: false
---

pageClass

Add extra class name to a specific page.

yaml
---
pageClass: custom-page-class
---

Then you can customize styles of this specific page in .vitepress/theme/custom.css file:

css
.custom-page-class {
  /* page-specific styles */
}
`,36))])}const F=n(o,[["render",c]]);export{b as __pageData,F as default};