deo

docsify-edit-on-github

edit on github plugin for docsify

Showing:

Popularity

Downloads/wk

653

GitHub Stars

53

Maintenance

Last Commit

3mos ago

Contributors

4

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

docsify-edit-on-github

A plugin for docsify to generate a edit on github button on every pages. click the button to open corresponding md editing page on github.

<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script>
<script>
  window.$docsify = {
    // your config
    // ...
    plugins: [
      EditOnGithubPlugin.create(docBase, docEditBase, title)
    ]
  }
</script>
  • docBase: [String] the document folder of your github project (e.g.: https://github.com/docsifyjs/docsify/blob/master/docs/)
  • docEditBase: [String] edit link of your github pages, by default, this is set automatically according to docBase
  • title: [String | Function] the text of the button, default value: Edit on github. If passed as function, then the title can be customized according to file path. for example:
      EditOnGithubPlugin.create(
        'https://github.com/docsifyjs/docsify/blob/master/docs/',
        null,
        function(file) {
          if (file.indexOf('en') === -1) {
            return '编辑'
          } else {
            return 'edit on git'
          }
        }
      )
    

Code example

Result example

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100