Skip to content

Commit

Permalink
feat: add edit button demo
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed May 30, 2017
1 parent f943fed commit a64cee1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
]
Expand Down
11 changes: 9 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
]
Expand Down

0 comments on commit a64cee1

Please sign in to comment.