You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/28 10:46:53 UTC

[echarts-handbook] branch master updated: fix crawler in generate

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

shenyi 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 526d3a4  fix crawler in generate
526d3a4 is described below

commit 526d3a4d0bc8950b9beacfd4cc276403c9082568
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 28 18:46:40 2021 +0800

    fix crawler in generate
---
 nuxt.config.js  |  5 +++++
 pages/index.vue | 15 +++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/nuxt.config.js b/nuxt.config.js
index 6f33315..60aa14f 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -141,6 +141,11 @@ export default {
         locales: ['en', 'zh'],
         strategy: 'prefix',
         defaultLocale: 'en',
+        detectBrowserLanguage: {
+          useCookie: true,
+          cookieKey: 'i18n_redirected',
+          onlyOnRoot: true
+        },
         vueI18n: {
           fallbackLocale: 'en',
           messages: {
diff --git a/pages/index.vue b/pages/index.vue
new file mode 100644
index 0000000..2fe85c8
--- /dev/null
+++ b/pages/index.vue
@@ -0,0 +1,15 @@
+<template>
+  <div>
+    <!-- These two links are for generate.crawler -->
+    <nuxt-link to="zh/get-started">中文</nuxt-link>
+    <nuxt-link to="en/get-started">English</nuxt-link>
+  </div>
+</template>
+
+<script lang="ts">
+export default {
+  async asyncData() {}
+}
+</script>
+
+<style></style>

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