diff --git a/docs/.vitepress/config/index.ts b/docs/.vitepress/config/index.ts index e943ff149..974cc2ff1 100644 --- a/docs/.vitepress/config/index.ts +++ b/docs/.vitepress/config/index.ts @@ -4,6 +4,8 @@ import nav_ru from "./nav.ru"; import sidebar_en from "./sidebar.en"; import sidebar_ru from "./sidebar.ru"; import sidebar_book_ru from "./sidebar.book.ru"; +import sidebar_vue_webapp_ru from "./sidebar.vue-webapp.ru"; +import sidebar_vue_webapp_en from "./sidebar.vue-webapp.en"; // https://vitepress.dev/reference/site-config export default defineConfig({ @@ -12,6 +14,14 @@ export default defineConfig({ root: { lang: "ru", label: "Русский", + themeConfig: { + nav: nav_ru, + sidebar: { + "/": sidebar_ru, + "/book/": sidebar_book_ru, + "/vue-webapp/": sidebar_vue_webapp_ru, + }, + }, head: [ [ "script", @@ -19,7 +29,6 @@ export default defineConfig({ `const init = localStorage.getItem("vue-faq-init") ?? false; localStorage.setItem("vue-faq-init", true); const isGoogleBot = window.navigator.userAgent.includes('googlebot'); - console.log("/en" + window.location.pathname); if (navigator.language != "ru-RU" && !init && !isGoogleBot) document.location="/en" + window.location.pathname; `, ], @@ -39,7 +48,10 @@ export default defineConfig({ label: "English", themeConfig: { nav: nav_en, - sidebar: sidebar_en, + sidebar: { + "/en/": sidebar_en, + "/en/vue-webapp/": sidebar_vue_webapp_en, + }, }, head: [ ["script", { async: "", src: "https://www.googletagmanager.com/gtag/js?id=G-JCCRGKJ88B" }], @@ -72,12 +84,7 @@ export default defineConfig({ search: { provider: "local", }, - // https://vitepress.dev/reference/default-theme-config - nav: nav_ru, - sidebar: { - "/": sidebar_ru, - "/book/": sidebar_book_ru, - }, + // https://vitepress.dev/reference/default-theme-config socialLinks: [ { icon: "github", link: "https://github.com/vuesence/vue-faq" }, { icon: {svg: 'Star it!'}, link: "https://github.com/vuesence/vue-faq" }