You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ Link target will be that page's source file on Github or Gitlab or any repo.
12
12
3. Run `gitbook install`. It will automatically install `edit-this-page-link` gitbook plugin for your book. This is needed only once.
13
13
4. Finally build your book (`gitbook build`) or serve (`gitbook serve`) as usual.
14
14
15
+
### Changing Link Label (Localization)
16
+
17
+
By default link label will be "Edit This Page". You can change it using plugin config `rtEditLinkLabel`.
18
+
15
19
## Sample `book.json` file
16
20
17
21
*Important*: Make sure you edit value of `rtEditLinkBase`. You can replace `edit` with `tree` if you want source file to open in read-mode, rather than edit-mode directly on github/gitlab.
@@ -20,7 +24,8 @@ Link target will be that page's source file on Github or Gitlab or any repo.
rtEditLink='<a href="'+this.options.pluginsConfig.rtEditLinkBase+'/'+page.path+'" class="btn fa fa-edit pull-left"> '+rtEditLinkLabel+'</a>';
15
+
16
+
page.content=page.content.replace(
30
17
'<!-- Actions Right -->',
31
-
'<a href="'+this.options.pluginsConfig.rtEditLinkBase+'/'+page.path+'" class="btn fa fa-edit pull-left"><b>Edit This Page on Github</b></a>'+'<!-- Actions Right -->'
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"name": "gitbook-plugin-edit-link",
3
3
"description": "GitBook Plugin to add \"Edit this page\" link on every page. Link target will be that page's source file on Github or Gitlab or any repo.",
0 commit comments