Skip to content

Commit d46819c

Browse files
achendrickulivz
authored andcommitted
feat: hide edit link by page (close: #284) (#286)
1 parent 4bf56d7 commit d46819c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/default-theme-config/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,14 @@ module.exports = {
321321
}
322322
```
323323

324+
You can also hide the edit link on a specific page via `YAML front matter`:
325+
326+
``` yaml
327+
---
328+
editLink: false
329+
---
330+
```
331+
324332
## Simple CSS Override
325333

326334
If you wish to apply simple overrides to the styling of the default theme, you can create an `.vuepress/override.styl` file. This is a [Stylus](http://stylus-lang.com/) file but you can use normal CSS syntax as well.

lib/default-theme/Page.vue

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export default {
5252
}
5353
},
5454
editLink () {
55+
if (this.$page.frontmatter.editLink === false) {
56+
return
57+
}
5558
const {
5659
repo,
5760
editLinks,

0 commit comments

Comments
 (0)