A Docsify plugin for adding an "Edit on Github" link to pages.
<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>
- Type:
String
- Default:
""
Required. The link to your GitHub repo.
- Type:
String
- Default:
"main"
The branch for creating commits or PRs.
- Type:
String
- Default:
"/docs"
The directory containing your Docsify installation.
- Type:
String
- Default:
"Edit on GitHub"
The title of the link.
- Type:
Boolean
- Default:
true
Specifies if the link should open in a new window.
You can see this plugin in use as part of Docsify Breeze (Live example, GitHub project).
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 and the
docsify
command available):
npm install -g docsify-cli
npm install
Finally, boot the local dev server:
npm start
By default, the server will boot at http://localhost:3000.
This project was created by Kevin Zolkiewicz and is licensed under an MIT License.
This project is supported by 8th Light.