# docsify-edit-on-github

> edit on github plugin for docsify

Latest version **1.0.3** (published 2019-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install docsify-edit-on-github
pnpm add docsify-edit-on-github
yarn add docsify-edit-on-github
bun add docsify-edit-on-github
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-11-18 |
| First published | 2017-08-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Maintainers | njleonzhang |

## Links

- npm: https://www.npmjs.com/package/docsify-edit-on-github
- Repository: https://github.com/njleonzhang/docsify-edit-on-github
- Homepage: https://github.com/njleonzhang/docsify-edit-on-github#readme
- Issues: https://github.com/njleonzhang/docsify-edit-on-github/issues
- npm.io page: https://npm.io/package/docsify-edit-on-github

## Recent versions

- 1.0.3 (latest) — 2019-11-18
- 1.0.2 — 2019-04-08
- 1.0.1 — 2017-09-01
- 1.0.0 — 2017-08-31

## 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.

```html
<script src="//unpkg.com/docsify-edit-on-github/index.js"></script>
```

```html
<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](https://github.com/njleonzhang/vue-data-tables/blob/6bb632419506a14ceff559708180883097d5afa2/docs/index.html#L179-L181)

[Result example](https://www.njleonzhang.com/vue-data-tables/#/en-us/basic)

---
_Source: https://npm.io/package/docsify-edit-on-github · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
