You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all, thanks for this great plugin, awesome work 👍 👍 👍
Hey I have a question or rather a suggestion. I can probably implement it myself through a PR, but I'd first want to know your thoughts on this before I proceed.
I have a documentation site where some pages are auto-generated API pages (from source). The edit-link is therefore different for these pages, it should point to the source-file, rather than the .md file. To support this, I had the following suggestion in mind, to extend the docEditBase argument so that it also supports a function. And in case it is a function, it is called for that particular page to request the edit-link. And when the function returns false it would disable editing of that page entirely. This would give you some control of which pages are editable and where they live, while keeping the API backwards compatible.
Example:
<script>
window.$docsify = {// your config// ...plugins: [EditOnGithubPlugin.create("https://github.com/IjzerenHein/firestorter/blob/feature-geoquery/docs/",function(docName,vm){// Point the auto-generated docs to the correct source fileif(docName.indexOf('api')>=0){return"https://github.com/IjzerenHein/firestorter/edit/feature-geoquery/src/"+docName.trim('.md')+'.ts';// Disable editing of external pages}elseif(docName.indexOf('external')>=0){returnfalse;}})]}</script>
I'd love to hear what you think :D
cheers, Hein
The text was updated successfully, but these errors were encountered:
Hi, first of all, thanks for this great plugin, awesome work 👍 👍 👍
Hey I have a question or rather a suggestion. I can probably implement it myself through a PR, but I'd first want to know your thoughts on this before I proceed.
I have a documentation site where some pages are auto-generated API pages (from source). The edit-link is therefore different for these pages, it should point to the source-file, rather than the .md file. To support this, I had the following suggestion in mind, to extend the
docEditBase
argument so that it also supports a function. And in case it is a function, it is called for that particular page to request the edit-link. And when the function returnsfalse
it would disable editing of that page entirely. This would give you some control of which pages are editable and where they live, while keeping the API backwards compatible.Example:
I'd love to hear what you think :D
cheers, Hein
The text was updated successfully, but these errors were encountered: