소스 검색

docs: 文档启用 Algolia 搜索

zhaihaoyi 6 년 전
부모
커밋
4bd9e42adf
3개의 변경된 파일10개의 추가작업 그리고 29개의 파일을 삭제
  1. 1 1
      demo/components/AppAside.vue
  2. 8 27
      docs/.vuepress/config.js
  3. 1 1
      docs/guide/essentials/i18n.md

+ 1 - 1
demo/components/AppAside.vue

@@ -29,7 +29,7 @@ export default {
           { text: '过渡效果', to: '/transition/' },
           { text: '初始展示页签', to: '/initial-tabs/' },
           {
-            text: 'i18n',
+            text: '多语言支持',
             children: [
               { text: '页签国际化', to: '/i18n/' },
               { text: '组件语言', to: '/lang-en/' },

+ 8 - 27
docs/.vuepress/config.js

@@ -56,32 +56,7 @@ module.exports = {
           ]
         }
       ]
-    }/* [
-      '/guide/',
-      '/guide/installation',
-      {
-        title: '基础',
-        collapsable: false,
-        children: [
-          '/guide/essentials/',
-          '/guide/essentials/operate',
-          '/guide/essentials/rule',
-          '/guide/essentials/i18n'
-        ]
-      },
-      {
-        title: '进阶',
-        collapsable: false,
-        children: [
-          '/guide/advanced/',
-          '/guide/advanced/transition',
-          '/guide/advanced/slot',
-          '/guide/advanced/initial-tabs',
-          '/guide/advanced/dynamic-tab-info',
-          '/guide/advanced/page-leave'
-        ]
-      }
-    ] */,
+    },
 
     // Demo路径
     demoUrl: demoUrl,
@@ -95,6 +70,12 @@ module.exports = {
     docsBranch: 'dev',
     
     lastUpdated: '上次更新',
+
+    // Algolia 搜索
+    algolia: {
+      apiKey: 'fdd2c011c382dd55036237094d62bd9e',
+      indexName: 'vue-router-tab'
+    }
   },
 
   // markdow 配置
@@ -112,4 +93,4 @@ module.exports = {
     },
     '@vuepress/back-to-top': true
   }
-}
+}

+ 1 - 1
docs/guide/essentials/i18n.md

@@ -25,7 +25,7 @@
 
 **配置自定义国际化方法**
 
-``` html
+``` html {2,9}
 <template>
   <router-tab :i18n="i18n" />
 </template>