diff --git a/.vitepress/config.ts b/.vitepress/config.ts index e9e7087..05fd795 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -141,10 +141,13 @@ export default defineConfig({ ru: { label: 'Русский', lang: 'ru-RU', - link: '/', + link: '/ru/', description: 'Стандарты разработки на Next.js + TypeScript с архитектурой SLM', themeConfig: { sidebar: ruSidebar, + socialLinks: [ + { icon: 'github', link: 'https://gromlab.ru/docs/nextjs-style-guide' }, + ], }, // Расширенный блок описания для llms.txt — даёт LLM полный // технический контекст: стек, методология, охват тем. @@ -156,10 +159,13 @@ export default defineConfig({ en: { label: 'English', lang: 'en-US', - link: '/', + link: '/en/', description: 'Next.js + TypeScript development standards with SLM architecture', themeConfig: { sidebar: enSidebar, + socialLinks: [ + { icon: 'github', link: 'https://gromlab.ru/docs/nextjs-style-guide' }, + ], }, llmsBlockquote: 'Frontend development standards for Next.js (App Router) + TypeScript + React projects with SLM architecture (Scoped Layered Module Design — a modular architecture with responsibility layers, where each module contains everything it needs: components, hooks, stores, types, styles).', diff --git a/.vitepress/theme/custom.css b/.vitepress/theme/custom.css index 1831c87..840117d 100644 --- a/.vitepress/theme/custom.css +++ b/.vitepress/theme/custom.css @@ -15,3 +15,14 @@ max-width: 100%; overflow-wrap: anywhere; } + +/* + * Скрыть root-локаль (лендинг с layout: false) из переключателя языка. + * VitePress не даёт исключить root через config — она всегда попадает + * в lang-switcher. Идентифицируем по href="/" — другие локали используют + * href="/ru/" и href="/en/". + */ +.VPNavBarTranslations a[href="/"], +.VPNavScreenTranslations a[href="/"] { + display: none; +} diff --git a/docs/index.md b/docs/index.md index 529878c..bd9aede 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,6 +17,7 @@ const dict = { tagline: 'Соглашения по разработке Next.js проектов: архитектура и слои приложения, структура кода, организация модулей, стилизация, типизация и инфраструктура.', langLabel: 'Язык', themeLabel: 'Тема', + repoLabel: 'Репозиторий', themes: { auto: 'Авто', light: 'Светлая', dark: 'Тёмная' }, cards: { docs: { @@ -45,6 +46,7 @@ const dict = { tagline: 'Conventions for Next.js project development: application architecture and layers, code structure, module organization, styling, typing, and infrastructure.', langLabel: 'Language', themeLabel: 'Theme', + repoLabel: 'Repository', themes: { auto: 'Auto', light: 'Light', dark: 'Dark' }, cards: { docs: { @@ -124,6 +126,17 @@ function toggleTheme(value) {

{{ t.tagline }}

+ + + {{ t.repoLabel }} +