diff options
Diffstat (limited to 'docs/index.html')
-rw-r--r-- | docs/index.html | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/docs/index.html b/docs/index.html index d4016e27d..94372944a 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -3,6 +3,7 @@ | |||
3 | <head> | 3 | <head> |
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <title>QMK Firmware</title> | 5 | <title>QMK Firmware</title> |
6 | <link rel="icon" type="image/png" href="gitbook/images/favicon.png"> | ||
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | 7 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
7 | <meta name="description" content="Description"> | 8 | <meta name="description" content="Description"> |
8 | <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | 9 | <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> |
@@ -20,19 +21,50 @@ | |||
20 | <div id="app"></div> | 21 | <div id="app"></div> |
21 | <script> | 22 | <script> |
22 | window.$docsify = { | 23 | window.$docsify = { |
24 | alias : { | ||
25 | '/en/(.*)': '/$1', | ||
26 | '/en-us/(.*)': '/$1', | ||
27 | '/en-gb/(.*)': '/$1', | ||
28 | '/.*/_langs.md': '/_langs.md', | ||
29 | }, | ||
30 | basePath: '/', | ||
23 | name: 'QMK Firmware', | 31 | name: 'QMK Firmware', |
24 | nameLink: 'https://qmk.fm/', | 32 | nameLink: '/', |
25 | repo: 'qmk/qmk_firmware', | 33 | repo: 'qmk/qmk_firmware', |
26 | loadSidebar: '_summary.md', | 34 | loadSidebar: '_summary.md', |
35 | loadNavbar: '_langs.md', | ||
36 | mergeNavbar: true, | ||
27 | auto2top: true, | 37 | auto2top: true, |
28 | formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}', | 38 | formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}', |
29 | search: { | 39 | search: { |
30 | paths: 'auto', | 40 | paths: 'auto', |
31 | placeholder: 'Search Documentation...', | 41 | placeholder: { |
32 | noData: 'We could not find any documents matching your search.', | 42 | '/zh-cn/': '搜索', |
43 | '/': 'Search' | ||
44 | }, | ||
45 | noData: { | ||
46 | '/zh-cn/': '没有结果!', | ||
47 | '/': 'No results!' | ||
48 | }, | ||
33 | depth: 6 | 49 | depth: 6 |
34 | }, | 50 | }, |
35 | fallbackLanguages: ['zh'] | 51 | plugins: [ |
52 | function (hook, vm) { | ||
53 | hook.beforeEach(function (html) { | ||
54 | if (/githubusercontent\.com/.test(vm.route.file)) { | ||
55 | url = vm.route.file | ||
56 | .replace('raw.githubusercontent.com', 'github.com') | ||
57 | .replace(/\/master/, '/blob/master') | ||
58 | } else { | ||
59 | url = 'https://github.com/qmk/qmk_firmware/blob/master/docs/' + vm.route.file | ||
60 | } | ||
61 | var editHtml = '[:memo: Edit Document](' + url + ')\n' | ||
62 | return html | ||
63 | + '\n\n----\n\n' | ||
64 | + editHtml | ||
65 | }) | ||
66 | }, | ||
67 | ] | ||
36 | } | 68 | } |
37 | </script> | 69 | </script> |
38 | <script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | 70 | <script src="//unpkg.com/docsify/lib/docsify.min.js"></script> |