This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git


The following commit(s) were added to refs/heads/master by this push:
     new bd65bf9  preconnect to docsearch server to make the first query faster
bd65bf9 is described below

commit bd65bf91f19c844009eb7faf13114e4ac2f47ee5
Author: plainheart <y...@all-my-life.cn>
AuthorDate: Sun Dec 17 21:19:41 2023 +0800

    preconnect to docsearch server to make the first query faster
---
 components/partials/Sidebar.vue | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/components/partials/Sidebar.vue b/components/partials/Sidebar.vue
index ec259a1..6c0ef39 100644
--- a/components/partials/Sidebar.vue
+++ b/components/partials/Sidebar.vue
@@ -88,11 +88,23 @@
 import Vue from 'vue'
 import SidebarNavItem from './SidebarNavItem.vue'
 
+const docsearchAppId = '14SYRIFETO'
+
 export default Vue.extend({
   components: {
     SidebarNavItem
   },
 
+  head: {
+    link: [
+      {
+        rel: 'preconnect',
+        href: `https://${docsearchAppId.toLowerCase()}-dsn.algolia.net`,
+        crossOrigin: ''
+      }
+    ]
+  },
+
   data() {
     return {
       sidebarOpen: false
@@ -112,7 +124,7 @@ export default Vue.extend({
     })
     // @ts-ignore
     docsearch({
-      appId: atob('MTRTWVJJRkVUTw'),
+      appId: docsearchAppId,
       apiKey: atob('MDY2ZGZiZDg3MTVlN2E0NGNjNjA4N2UyOTE0Njk1ZDE'),
       indexName: 'apache_echarts',
       inputSelector: '#handbook-search-input',


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to