vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
29 stars 41 forks source link

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

Open Lemmingh opened 2 years ago

Lemmingh commented 2 years ago

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:

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

devPaulRS commented 2 years ago

@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 commented 2 years ago

Use:

//  .vuepress/config.ts

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

instead of:

//  .vuepress/config.ts

  editLinkPattern: ':repo/edit/:branch/:path',
Lemmingh commented 2 years ago

https://github.com/vuepress/ecosystem/issues/5

I am aware of the workaround.

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


https://github.com/vuepress/ecosystem/issues/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.