From 512888513f99d36a89cd831a43075ca84ed746f6 Mon Sep 17 00:00:00 2001
From: ripper <453942056@qq.com>
Date: Wed, 23 Jun 2021 12:25:53 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=8E=20github=20?=
=?UTF-8?q?=E7=BC=96=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/index.html | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index 1e52722..52c6a54 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -62,20 +62,21 @@
placeholder: '搜索',
noData: '找不到结果',
},
-
- // plugins: [
- // // Edit On Github
- // function (hook, vm) {
- // hook.beforeEach(function (html) {
- // var url = 'https://github.com/ripperhe/docsify-template/blob/master/' + vm.route.file
- // var editHtml = '[:memo: Edit Document](' + url + ')\n\n'
- // return editHtml
- // + html
- // + '\n\n----\n\n'
- // // + 'Powered by docsify'
- // })
- // },
- // ]
+ plugins: [
+ // Edit On Github
+ function (hook, vm) {
+ hook.beforeEach(function (html) {
+ var url = 'https://github.com/ripperhe/Bob/blob/master/docs/' + vm.route.file
+ if (vm.route.file === 'https://cdn.jsdelivr.net/gh/ripperhe/Bob@master/README.md') {
+ url = 'https://github.com/ripperhe/Bob/blob/master/README.md'
+ }
+ var editHtml = '[:memo: 在 Github 上编辑](' + url + ')\n\n'
+ return editHtml
+ + html
+ + '\n\n----\n\n'
+ })
+ },
+ ]
}