feat: add edit button demo
This commit is contained in:
parent
f943fede99
commit
a64cee1236
2 changed files with 18 additions and 4 deletions
11
dev.html
11
dev.html
|
|
@ -34,9 +34,16 @@
|
||||||
formatUpdated: '{MM}/{DD} {HH}:{mm}',
|
formatUpdated: '{MM}/{DD} {HH}:{mm}',
|
||||||
routerMode: 'history',
|
routerMode: 'history',
|
||||||
plugins: [
|
plugins: [
|
||||||
function(hook) {
|
function(hook, vm) {
|
||||||
hook.beforeEach(function (html) {
|
hook.beforeEach(function (html) {
|
||||||
return html += '\n> Last modified {docsify-updated}'
|
var url = 'https://github.com/QingWei-Li/docsify/blob/master' + vm.router.getFile()
|
||||||
|
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
|
||||||
|
|
||||||
|
return editHtml
|
||||||
|
+ html
|
||||||
|
+ '\n----\n'
|
||||||
|
+ 'Last modified {docsify-updated} '
|
||||||
|
+ editHtml
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,16 @@
|
||||||
},
|
},
|
||||||
formatUpdated: '{MM}/{DD} {HH}:{mm}',
|
formatUpdated: '{MM}/{DD} {HH}:{mm}',
|
||||||
plugins: [
|
plugins: [
|
||||||
function(hook) {
|
function(hook, vm) {
|
||||||
hook.beforeEach(function (html) {
|
hook.beforeEach(function (html) {
|
||||||
return html += '\n> Last modified {docsify-updated}'
|
var url = 'https://github.com/QingWei-Li/docsify/blob/master' + vm.router.getFile()
|
||||||
|
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
|
||||||
|
|
||||||
|
return editHtml
|
||||||
|
+ html
|
||||||
|
+ '\n----\n'
|
||||||
|
+ 'Last modified {docsify-updated} '
|
||||||
|
+ editHtml
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue