From 0f4577a0a110c73796fd1e65c343bb9199da65d7 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 22 Jun 2019 09:44:47 +0800 Subject: add docute links --- index.html | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 700a391c..703c5c89 100644 --- a/index.html +++ b/index.html @@ -25,11 +25,51 @@ subMaxLevel: 4, alias: { - '/home': '/', - '/zh/(.*)': '/zh/$1' - } + '/home': '/docute/README', + '/plugins': '/docute/plugins', + '/manual': '/docute/manual', + '/zh/': '/docute/zh/README', + '/zh/plugins': '/docute/zh/plugins', + '/zh/manual': '/docute/zh/manual', + + '/zh-cn/(.*)': '/zh-cn/$1' + }, + search: { + noData: { + '/zh-cn/': '没有结果!', + '/': 'No results!' + }, + paths: 'auto', + placeholder: { + '/zh-cn/': '搜索', + '/': 'Search' + } + }, + formatUpdated: '{MM}/{DD} {HH}:{mm}', + plugins: [ + function (hook, vm) { + hook.beforeEach(function (html) { + if (/githubusercontent\.com/.test(vm.route.file)) { + url = vm.route.file + .replace('raw.githubusercontent.com', 'github.com') + .replace(/\/master/, '/blob/master') + } else { + url = 'https://github.com/xmake-io/xmake-docs/blob/master/' + vm.route.file + } + var editHtml = '[:memo: Edit Document](' + url + ')\n' + return editHtml + + html + + '\n\n----\n\n' + + 'Powered by docsify' + }) + } + ] } + + + + -- cgit v1.2.3