Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/en/reference/frontmatter-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ You can access frontmatter data via the `$frontmatter` global in Vue expressions
{{ $frontmatter.title }}
```

However, avoid using a Vue expression in this manner inside Markdown headings:

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

# {{ $frontmatter.title }}
```

The heading's anchor and accessibility attributes, as well as search index contents, are produced **before** Vue evaluates the expression, which will result in the string `frontmatter-title` being used in those places instead of the actual title.

## title

- Type: `string`
Expand Down