Vuepress create H1 from .md file title

Viewed 100

In .md file I've got a title name but vuepress just changes the HTML title but I want it to create a <h1> Just a simple title </h1> in the document. Is there a way to do it, maybe create a custom rule for .md file?

---
title: Just a sample title
---
1 Answers

The frontmatter property title is parsed into the $page.title property for the page's Vue component. Use the following VuePress Templating/Interpolation to access the $page object.

---
title: "My Page Title"
---

# {{ $page.title }}

This will render <h1>My Page Title</h1> in the HTML. You would have to paste # {{ $page.title }} on every page though.

Related