| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This GitBook Plugin adds "Edit This Page" link on every page.
Link target will be that page's source file on Github or Gitlab or any repo.
{
"gitbook": "2.0.1",
"plugins": ["edit-link"],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/USER/REPO/edit/BRANCH/path/to/book",
"label": "Edit This Page"
}
}
}
{
"gitbook": "2.0.1",
"plugins": ["edit-link"],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/USER/REPO/edit/BRANCH/path/to/book",
"label": {
"en": "Edit This Page",
"de": "Seite bearbeiten"
}
}
}
}
{
"gitbook": "1.5.0",
"plugins": ["edit-link@1.1.0"],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/USER/REPO/edit/BRANCH/path/to/book",
"label": "Edit This Page"
}
}
}
Note: Above snippet can be used as complete book.json file, if your book doesn't have one yet.
Github/Gitlab: In string ...REPO/edit/BRANCH..., you may replace edit with tree if you want source file to open in read-mode, rather than edit-mode directly on github/gitlab.
Gitbook 2.0.1 has removed page:after hook which this plugin needs. An issue has been reported here - GitbookIO/gitbook#724 but meanwhile this plugin is using workaround added by this pull request - rtCamp/gitbook-plugin-edit-link#4
So when using Gitbook 2.0.1, you may see following warning in console at the time of running build:
warn: hook 'page' used by plugin 'gitbook-plugin-edit-link' is deprecated, and will be remove in the coming versions
You can safely ignore above warning for now.
This plugin simply looks for HTML comment <!-- Actions Right --> in parsed page content and insert "edit link" HTML just before <!-- Actions Right -->.
This means if that HTML comment changes, this plugin will break but I hope to fix it easily whenever that happen.
1.3 - 28 April 2015
1.2 - 03 April 2015
1.1.3 - 11 Jan 2015
| Back | FazBrowse Home | New Git URL |