feat: add edit button demo

This commit is contained in:
qingwei.li 2017-05-30 20:12:25 +08:00
parent f943fede99
commit a64cee1236
No known key found for this signature in database
GPG Key ID: B6DDC2F7AE80B2F4
2 changed files with 18 additions and 4 deletions

View File

@ -34,9 +34,16 @@
formatUpdated: '{MM}/{DD} {HH}:{mm}',
routerMode: 'history',
plugins: [
function(hook) {
function(hook, vm) {
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
})
}
]

View File

@ -51,9 +51,16 @@
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook) {
function(hook, vm) {
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
})
}
]