Skip to content

Post Front Matter

Each post at the top of its Markdown file can have frontmatter set. You can use any frontmatter provided by VitePress as well. These are the ones that VitePress Blog deals with.

yaml
---
date: 2022-12-01
title: 'Markdown: The Language of the Web'
author: Robot Editor
category: Tutorial
next: false
tags:
  - vue
  - web development
---

date

The post's date, in yyyy-mm-dd format.

title

The post's title

author

Specify the author for the post. Additional details can set in the authors file. A default author can be set in config. This should match the name in one of the author files to ensure additional information shown.

category

Specify what category you want for the post, limited to one. A default category can be set in config.

tags

Tags for this post, can be listed comma separated or individually

yaml
---
tags:
  - vue
  - web development
    
---

or

---
tags: vue, 'web development'

---

comment

When the configuration option enables the comment area by default, add the following code, the comment area will not be generated

md
---
comment: false
---

When the configuration options do not enable the comment area by default, you can still enable the comment area on the current page through the following code

md
---
comment: true
---

I just try my best to make thing well, Could you give a star ⭐