Browse Source

fix(docs): redirect to target lang show 404

Jacky 1 year ago
parent
commit
0a24469248
2 changed files with 3 additions and 3 deletions
  1. 2 2
      .github/workflows/build.yml
  2. 1 1
      docs/.vitepress/theme/Layout.vue

+ 2 - 2
.github/workflows/build.yml

@@ -5,8 +5,8 @@ on:
         branches:
             - '*'
         paths:
-            - "**/*.js"
-            - "**/*.vue"
+            - "app/**/*.js"
+            - "app/**/*.vue"
             - "app/package.json"
             - "app/.env*"
             - "**/*.go"

+ 1 - 1
docs/.vitepress/theme/Layout.vue

@@ -20,7 +20,7 @@ onMounted(async () => {
     && locales[language]
     && !route.path.includes(language)
   ) {
-    await router.go(language + '/' + route.path)
+    await router.go(language + (route.path !== '/' ? route.path : ''))
   }
 })
 </script>