@murshisoft/docus 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/routing.ts +10 -3
- package/package.json +1 -1
package/modules/routing.ts
CHANGED
|
@@ -22,9 +22,16 @@ export default defineNuxtModule({
|
|
|
22
22
|
extendPages((pages) => {
|
|
23
23
|
const landingTemplate = resolve('../app/templates/landing.vue')
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (isI18nEnabled) {
|
|
26
|
+
// Add a catch-all root redirect for i18n
|
|
27
|
+
const defaultLocale = (nuxt.options.i18n as any)?.defaultLocale || 'en'
|
|
28
|
+
pages.push({
|
|
29
|
+
name: 'index-redirect',
|
|
30
|
+
path: '/',
|
|
31
|
+
redirect: `/${defaultLocale}`,
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
28
35
|
pages.push({
|
|
29
36
|
name: 'index',
|
|
30
37
|
path: '/',
|