docs: frontmatter updates

pull/2056/head
Evan You 2 years ago
parent e5cfe96ece
commit aa5b0b4cd7

@ -265,6 +265,7 @@ export interface Footer {
## editLink ## editLink
- Type: `EditLink` - Type: `EditLink`
- Can be overridden per page via [frontmatter](./frontmatter-config#editlink)
Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. See [Default Theme: Edit Link](./default-theme-edit-link) for more details. Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. See [Default Theme: Edit Link](./default-theme-edit-link) for more details.

@ -1,5 +1,7 @@
# Edit Link # Edit Link
## Site-Level Config
Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. To enable it, add `themeConfig.editLink` options to your config. Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. To enable it, add `themeConfig.editLink` options to your config.
```js ```js
@ -46,3 +48,13 @@ export default {
} }
} }
``` ```
## Frontmatter Config
This can be disabled per-page using the `editLink` option on frontmatter:
```yaml
---
lastUpdated: false
---
```

@ -1,11 +1,8 @@
# Last Updated # Last Updated
The update time of the last content will be displayed in the lower right corner of the page. The update time of the last content will be displayed in the lower right corner of the page. To enable it, add `lastUpdated` options to your config.
To enable it, add `lastUpdated` options to your config.
## Page Configuration ## Site-Level Config
Add `lastUpdated` options to your config.
```js ```js
export default { export default {
@ -13,9 +10,9 @@ export default {
} }
``` ```
## Frontmatter Configuration ## Frontmatter Config
If you would like to hide the last update text, set false to the `lastUpdated` option. This can be disabled per-page using the `lastUpdated` option on frontmatter:
```yaml ```yaml
--- ---

@ -136,10 +136,23 @@ The levels of header in the outline to display for the page. It's same as [confi
- Type: `boolean` - Type: `boolean`
- Default: `true` - Default: `true`
Whether to display [Last Updated](./default-theme-last-updated) text in the current page. Whether to display [Last Updated](./default-theme-last-updated) text in the footer of the current page.
```yaml ```yaml
--- ---
lastUpdated: false lastUpdated: false
--- ---
``` ```
### editLink <Badge type="info" text="default theme only" />
- Type: `boolean`
- Default: `true`
Whether to display [Edit Link](./default-theme-edit-link) in the footer of the current page.
```yaml
---
editLink: false
---
```

Loading…
Cancel
Save