1.0.1 • Published 1 year ago

docsify-github-edit-link v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

License: MIT

docsify-github-edit-link

A Docsify plugin for adding an "Edit on Github" link to pages.

Usage

<script>
  window.$docsify = {
    // ... (your existing Docsify config)
    githubEditLink: {
      repo: "https://github.com/zolk/docsify-github-edit-link",
    },
  };
</script>
<script src="//cdn.jsdelivr.net/npm/docsify-github-edit-link@1/dist/github-edit-link.min.js"></script>

Options

githubEditLink.repo

  • Type: String
  • Default: ""

Required. The link to your GitHub repo.

githubEditLink.branch

  • Type: String
  • Default: "main"

The branch for creating commits or PRs.

githubEditLink.docsDir

  • Type: String
  • Default: "/docs"

The directory containing your Docsify installation.

githubEditLink.title

  • Type: String
  • Default: "Edit on GitHub"

The title of the link.

githubEditLink.newWindow

  • Type: Boolean
  • Default: true

Specifies if the link should open in a new window.

Live Example

You can see this plugin in use as part of DS Starter Kit (Live example, GitHub project).

Local Demo

You can test this project locally in a demo Docsify installation.

First, clone this repo:

git clone https://github.com/zolk/docsify-github-edit-link.git

Then install dependencies (you'll need Node installed):

npm install

Finally, boot the local dev server:

npm start

By default, the server will boot at http://localhost:3000.

License

This project was created by Kevin Zolkiewicz and is licensed under an MIT License.