Open Lemmingh opened 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.
Use:
// .vuepress/config.ts
editLinkPattern: ':repo/blob/:branch/:path',
instead of:
// .vuepress/config.ts
editLinkPattern: ':repo/edit/:branch/:path',
I opened this request for a chance to get rid of these frustrating and semantically incorrect patches.
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.
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
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.