瀏覽代碼

Add yet another dictionary for the QMK Firmware docs sidebar heading (#7504)

fauxpark 5 年之前
父節點
當前提交
7164e8eeb5
共有 2 個文件被更改,包括 17 次插入2 次删除
  1. 11 2
      docs/index.html
  2. 6 0
      docs/translating.md

+ 11 - 2
docs/index.html

@@ -21,7 +21,7 @@
   <div id="app"></div>
   <div id="app"></div>
   <script>
   <script>
     window.$docsify = {
     window.$docsify = {
-      alias : {
+      alias: {
         '/en/(.*)': '/$1',
         '/en/(.*)': '/$1',
         '/en-us/(.*)': '/$1',
         '/en-us/(.*)': '/$1',
         '/en-gb/(.*)': '/$1',
         '/en-gb/(.*)': '/$1',
@@ -29,7 +29,16 @@
       },
       },
       basePath: '/',
       basePath: '/',
       name: 'QMK Firmware',
       name: 'QMK Firmware',
-      nameLink: '/',
+      nameLink: {
+        '/de/': '/#/de/',
+        '/es/': '/#/es/',
+        '/fr-fr/': '/#/fr-fr/',
+        '/he-il/': '/#/he-il/',
+        '/ja/': '/#/ja/',
+        '/ru-ru/': '/#/ru-ru/',
+        '/zh-cn/': '/#/zh-cn/',
+        '/': '/#/'
+      },
       repo: 'qmk/qmk_firmware',
       repo: 'qmk/qmk_firmware',
       loadSidebar: '_summary.md',
       loadSidebar: '_summary.md',
       loadNavbar: '_langs.md',
       loadNavbar: '_langs.md',

+ 6 - 0
docs/translating.md

@@ -32,6 +32,12 @@ Once you've finished translating a new language, you'll also need to modify the
   '/zh-cn/': '没有结果!',
   '/zh-cn/': '没有结果!',
   ```
   ```
 
 
+  The `nameLink` object, for setting the "QMK Firmware" heading link in the sidebar, must also be added to:
+
+  ```js
+  '/zh-cn/': '/#/zh-cn/',
+  ```
+
   And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing:
   And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing:
 
 
   ```js
   ```js