Skip to content
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

[Feature request] "View source" or "Edit this page" #5

Open
Lemmingh opened this issue Jul 3, 2022 · 3 comments
Open

[Feature request] "View source" or "Edit this page" #5

Lemmingh opened this issue Jul 3, 2022 · 3 comments
Labels

Comments

@Lemmingh
Copy link

Lemmingh commented Jul 3, 2022

Clear and concise description of the problem

I have a feeling that a serious documentation contributor has lots of things to do before editing a page:

  • Examine the page source.
  • Search for existing issues.
  • Read the contributing guide.
  • Fork the repository.
  • Create a development branch.

From this point of view, the "Edit this page" link (editLink) of the default theme is a bit useless and inconvenient.

Suggested solution

Could VuePress give a design explanation on the topic?

Or, just introduce a "View source" link in the default theme?

Alternative

No response

Additional context

  • On Microsoft Docs, the "Edit This Document" link (pencil button around the beginning of a page) is actually a "view source" link.

  • On MDN Web Docs, both "Source" and "Edit" links exist near the footer of a page.

@meteorlxy meteorlxy added the enhancement New feature or request label Jul 6, 2022
@devPaulRS
Copy link

devPaulRS commented Jul 12, 2022

@Lemmingh I've actually made my own custom version with this with v-md-editor and node.js to create a view source with save, wasn't all that easy but eventually got it right.

Just remember it needs some type of authentication and of course a form of permissions, otherwise anyone can edit the source.

There are many MD editors you can make use of, i just used something i found that happens to do what i need it to do to an extent.

@jrappen
Copy link

jrappen commented Jul 21, 2022

Use:

//  .vuepress/config.ts

  editLinkPattern: ':repo/blob/:branch/:path',

instead of:

//  .vuepress/config.ts

  editLinkPattern: ':repo/edit/:branch/:path',

@Lemmingh
Copy link
Author

#5

I am aware of the workaround.

I opened this request for a chance to get rid of these frustrating and semantically incorrect patches.


#5

I'm afraid I didn't mean to implement a Markdown editor.

At the sites I work on, we have branch protection, and encourage contributors to take advantage of the Web IDE and the github.dev, rendering the "Edit" pages worthless.

Therefore, I would like "View" link patterns built into the VuePress default theme.

@meteorlxy meteorlxy transferred this issue from vuepress/core Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants