summaryrefslogtreecommitdiff
path: root/docs/index.html
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2019-10-01 13:51:23 -0400
committerGitHub <noreply@github.com>2019-10-01 13:51:23 -0400
commit68072e931a1e67ce2d6f71be5efff559305072d6 (patch)
tree46b617670137b658629c6dd33d41b115d94221af /docs/index.html
parentc7b28bffc13d405bea2e0c0243437920659232f2 (diff)
downloadqmk_firmware-68072e931a1e67ce2d6f71be5efff559305072d6.tar.gz
qmk_firmware-68072e931a1e67ce2d6f71be5efff559305072d6.zip
Expose zh-cn docs, delete bad zh docs, add docs for adding translations (#6855)
* expose zh-cn docs, delete bad zh docs, add docs for adding translations * Update docs/translating.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/translating.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update for python 3
Diffstat (limited to 'docs/index.html')
-rw-r--r--docs/index.html40
1 files changed, 36 insertions, 4 deletions
diff --git a/docs/index.html b/docs/index.html
index d4016e27d3..94372944a9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>QMK Firmware</title>
+ <link rel="icon" type="image/png" href="gitbook/images/favicon.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<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 @@
<div id="app"></div>
<script>
window.$docsify = {
+ alias : {
+ '/en/(.*)': '/$1',
+ '/en-us/(.*)': '/$1',
+ '/en-gb/(.*)': '/$1',
+ '/.*/_langs.md': '/_langs.md',
+ },
+ basePath: '/',
name: 'QMK Firmware',
- nameLink: 'https://qmk.fm/',
+ nameLink: '/',
repo: 'qmk/qmk_firmware',
loadSidebar: '_summary.md',
+ loadNavbar: '_langs.md',
+ mergeNavbar: true,
auto2top: true,
formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}',
search: {
paths: 'auto',
- placeholder: 'Search Documentation...',
- noData: 'We could not find any documents matching your search.',
+ placeholder: {
+ '/zh-cn/': '搜索',
+ '/': 'Search'
+ },
+ noData: {
+ '/zh-cn/': '没有结果!',
+ '/': 'No results!'
+ },
depth: 6
},
- fallbackLanguages: ['zh']
+ 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/qmk/qmk_firmware/blob/master/docs/' + vm.route.file
+ }
+ var editHtml = '[:memo: Edit Document](' + url + ')\n'
+ return html
+ + '\n\n----\n\n'
+ + editHtml
+ })
+ },
+ ]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>