Skip to content

Edit link can't be disabled via frontmatter #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
dirkdev98 opened this issue Jul 14, 2021 · 0 comments · Fixed by #340
Closed
3 tasks done

Edit link can't be disabled via frontmatter #334

dirkdev98 opened this issue Jul 14, 2021 · 0 comments · Fixed by #340
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@dirkdev98
Copy link
Contributor

Describe the bug

When edit link is enabled in the config, disabling it via frontmatter on a page is not possible.
This seems to be caused here https://github.com/vuejs/vitepress/blob/master/src/client/theme-default/composables/editLink.ts#L19.

Intending to open a PR if the expected behaviour is agreed upon.

Reproduction

  • Set editLink to true in the config
  • Add editLink: false to the frontmatter of a documentation page
  • The Edit this page link still shows up

Expected behavior

Expecting that when either editLink: false or editLink: "false" is passed in via frontmatter, that the edit link is not rendered on that page.

System Info

System:
  OS: Linux 5.10 Manjaro Linux
  CPU: (8) x64 Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
  Memory: 19.23 GB / 31.28 GB
  Container: Yes
  Shell: 5.1.4 - /bin/bash
Binaries:
  Node: 16.0.0 - ~/.config/nvm/versions/node/v16.0.0/bin/node
  Yarn: 1.22.5 - ~/.yarn/bin/yarn
  npm: 7.10.0 - ~/.config/nvm/versions/node/v16.0.0/bin/npm
npmPackages:
  vitepress: 0.15.6 => 0.15.6

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@dirkdev98 dirkdev98 added the bug: pending triage Maybe a bug, waiting for confirmation label Jul 14, 2021
@posva posva mentioned this issue Oct 20, 2022
4 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant