Skip to content

Commit f619e22

Browse files
ulivzyyx990803
authored andcommitted
docs: add at least one reference link for YAML front matter and unify the expression. (#66)
1 parent edf3e5e commit f619e22

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: docs/default-theme-config/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All options listed on this page apply to the default theme only. If you are usin
1010

1111
## Homepage
1212

13-
The default theme provides a homepage layout (which is used on [the homepage of this very website](/)). To use it, specify `home: true` plus some other metadata in your root `README.md`'s YAML front matter. This is the actual data used on this site:
13+
The default theme provides a homepage layout (which is used on [the homepage of this very website](/)). To use it, specify `home: true` plus some other metadata in your root `README.md`'s [YAML front matter](../guide/markdown.html#yaml-front-matter). This is the actual data used on this site:
1414

1515
``` yaml
1616
---
@@ -29,7 +29,7 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
2929
---
3030
```
3131

32-
Any additional content after the front matter will be parsed as normal markdown and rendered after the features section.
32+
Any additional content after the `YAML front matter` will be parsed as normal markdown and rendered after the features section.
3333

3434
If you want to use a completely custom homepage layout, you can also use a [Custom Layout](#custom-layout-for-specific-pages).
3535

@@ -67,13 +67,13 @@ module.exports = {
6767
}
6868
```
6969

70-
You can omit the `.md` extension, and paths ending with `/` are inferred as `*/README.md`. The text for the link is automatically inferred (either from the first header in the page or explicit title in YAML frontmatter). If you wish to explicitly specify the link text, use an Array in form of `[link, text]`.
70+
You can omit the `.md` extension, and paths ending with `/` are inferred as `*/README.md`. The text for the link is automatically inferred (either from the first header in the page or explicit title in `YAML front matter`). If you wish to explicitly specify the link text, use an Array in form of `[link, text]`.
7171

7272
### Nested Header Links
7373

7474
The sidebar automatically displays links for headers in the current active page, nested under the link for the page itself. You can customize this behavior using `themeConfig.sidebarDepth`. The default depth is `1`, which extracts the `h2` headers. Setting it to `0` disables the header links, and the max value is `2` which extracts both `h2` and `h3` headers.
7575

76-
A page can also override this value in using YAML frontmatter:
76+
A page can also override this value in using `YAML front matter`:
7777

7878
``` md
7979
---
@@ -151,7 +151,7 @@ module.exports = {
151151

152152
### Auto Sidebar for Single Pages
153153

154-
If you wish to automatically generate a sidebar that contains only the header links for the current page, you can use YAML front matter on that page:
154+
If you wish to automatically generate a sidebar that contains only the header links for the current page, you can use `YAML front matter` on that page:
155155

156156
``` yaml
157157
---
@@ -161,7 +161,7 @@ sidebar: auto
161161

162162
### Disabling the Sidebar
163163

164-
You can disable the sidebar on a specific page with YAML front matter:
164+
You can disable the sidebar on a specific page with `YAML front matter`:
165165

166166
``` yaml
167167
---
@@ -171,7 +171,7 @@ sidebar: false
171171

172172
## Prev / Next Links
173173

174-
Prev and next links are automatically inferred based on the sidebar order of the active page. You can also explicitly overwrite or disable them using YAML front matter:
174+
Prev and next links are automatically inferred based on the sidebar order of the active page. You can also explicitly overwrite or disable them using `YAML front matter`:
175175

176176
``` yaml
177177
---
@@ -216,7 +216,7 @@ $codeBgColor = #282c34
216216

217217
## Custom Layout for Specific Pages
218218

219-
By default the content of each `*.md` file is rendered in a `<div class="page">` container, along with the sidebar, auto-generated edit links and prev/next links. If you wish to use a completely custom component in place of the page (while only keeping the navbar), you can again specify the component to use using YAML front matter:
219+
By default the content of each `*.md` file is rendered in a `<div class="page">` container, along with the sidebar, auto-generated edit links and prev/next links. If you wish to use a completely custom component in place of the page (while only keeping the navbar), you can again specify the component to use using `YAML front matter`:
220220

221221
``` yaml
222222
---

Diff for: docs/guide/custom-themes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This is the value of `$site` of this very website:
3737
}
3838
```
3939

40-
`title`, `description` and `base` are copied from respective fields in `.vuepress/config.js`. `pages` contains an array of metadata objects for each page, including its path, page title (explicitly specified in YAML frontmatter or inferred from the first header on the page), and any YAML frontmatter data in that file.
40+
`title`, `description` and `base` are copied from respective fields in `.vuepress/config.js`. `pages` contains an array of metadata objects for each page, including its path, page title (explicitly specified in [YAML front matter](./markdown.html#yaml-front-matter) or inferred from the first header on the page), and any YAML front matter data in that file.
4141

4242
This is the `$page` object for this page you are looking at:
4343

0 commit comments

Comments
 (0)