Project Content
This document outlines page generation, Markdown processing, and Frontmatter configuration in a VuePress project.
Generating Pages
VuePress generates standalone pages from Markdown files. The route path corresponds to the file's relative path.
When generating a project via the CLI helper, you will see the following directory structure:
└─ src
├─ demo
│ ├─ ...
│ ├─ page.md
│ ├─ markdown.md
│ └─ README.md
├─ ...
└─ README.mdRoute path resolution:
| Relative Path | Route Path |
|---|---|
/README.md | / |
/demo/README.md | /demo/ |
/demo/page.md | /demo/page.html |
Note
README.md resolves to index.html and serves as the directory's index page.
Markdown Processing
VuePress Theme Hope processes Markdown files into HTML. You can edit Markdown files to modify content, and changes will sync in real time while the development server is running.
Tips
Refer to the Markdown Tutorial for basic syntax.
Info
Syntax extensions available in the environment:
- VuePress base extensions:VuePress → Markdown.
- Theme plugin extensions: Guide → Markdown.
:::
Frontmatter Configuration
Frontmatter assigns page-level configurations. It uses YAML format and must be placed at the top of the Markdown file, enclosed by triple dashes (---).
---
lang: en-US
title: the title of the page
description: the description of the page
---
<!-- Here is Markdown Content -->
...Frontmatter properties (e.g., lang, title, description) override global settings from the VuePress config file. These configurations apply exclusively to the current page and take the highest priority.
Changelog
2d7bd-on6ca3e-on68504-ond45e2-on6ad69-on31f0e-onf72bc-on8a130-on16c4f-on5a635-ond45fd-on2a306-on8174c-ona0c8a-onec469-on2243a-on9e3b2-on