diff --git a/docs/default-theme-config/README.md b/docs/default-theme-config/README.md index 4f525316df..8a2ea09f6e 100644 --- a/docs/default-theme-config/README.md +++ b/docs/default-theme-config/README.md @@ -321,6 +321,14 @@ module.exports = { } ``` +You can also hide the edit link on a specific page via `YAML front matter`: + +``` yaml +--- +editLink: false +--- +``` + ## Simple CSS Override 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. diff --git a/lib/default-theme/Page.vue b/lib/default-theme/Page.vue index cb28803e36..ea03b3ff19 100644 --- a/lib/default-theme/Page.vue +++ b/lib/default-theme/Page.vue @@ -52,6 +52,9 @@ export default { } }, editLink () { + if (this.$page.frontmatter.editLink === false) { + return + } const { repo, editLinks,