Files
S.Gromov 93684be5bd chore: обновлены конфиги под единый файл workflow
- Заменена группа из 9 пунктов Workflow в sidebar на одну ссылку
- Обновлён concat-md.js: 9 файлов воркфлоу заменены на workflow.md
2026-03-29 14:04:19 +03:00

113 lines
4.1 KiB
TypeScript

import { defineConfig } from 'vitepress';
const ruSidebar = [
{
text: 'Workflow',
link: '/workflow',
},
{
text: 'Базовые правила',
items: [
{ text: 'Технологии и библиотеки', link: '/basics/tech-stack' },
{ text: 'Архитектура', link: '/basics/architecture' },
{ text: 'Стиль кода', link: '/basics/code-style' },
{ text: 'Именование', link: '/basics/naming' },
{ text: 'Документирование', link: '/basics/documentation' },
{ text: 'Типизация', link: '/basics/typing' },
],
},
{
text: 'Прикладные разделы',
items: [
{ text: 'Настройка VS Code', link: '/applied/vscode' },
{ text: 'Структура проекта', link: '/applied/project-structure' },
{ text: 'Компоненты', link: '/applied/components' },
{ text: 'Page-level компоненты', link: '/applied/page-level' },
{ text: 'Шаблоны и генерация кода', link: '/applied/templates-generation' },
{ text: 'Стили', link: '/applied/styles' },
{ text: 'Изображения', link: '/applied/images-sprites' },
{ text: 'SVG-спрайты', link: '/applied/svg-sprites' },
{ text: 'Видео', link: '/applied/video' },
{ text: 'API', link: '/applied/api' },
{ text: 'Stores', link: '/applied/stores' },
{ text: 'Хуки', link: '/applied/hooks' },
{ text: 'Шрифты', link: '/applied/fonts' },
{ text: 'Локализация', link: '/applied/localization' },
],
},
];
const enSidebar = [
{
text: 'Processes',
items: [
{ text: 'Getting Started', link: '/en/workflow/getting-started' },
{ text: 'Creating an App', link: '/en/workflow/creating-app' },
{ text: 'Creating Pages', link: '/en/workflow/creating-pages' },
{ text: 'Creating Components', link: '/en/workflow/creating-components' },
{ text: 'Styling', link: '/en/workflow/styling' },
{ text: 'Data Fetching', link: '/en/workflow/data-fetching' },
{ text: 'State Management', link: '/en/workflow/state-management' },
{ text: 'Localization', link: '/en/workflow/localization' },
],
},
{
text: 'Basic Rules',
items: [
{ text: 'Tech Stack', link: '/en/basics/tech-stack' },
{ text: 'Architecture', link: '/en/basics/architecture' },
{ text: 'Code Style', link: '/en/basics/code-style' },
{ text: 'Naming', link: '/en/basics/naming' },
{ text: 'Documentation', link: '/en/basics/documentation' },
{ text: 'Typing', link: '/en/basics/typing' },
],
},
{
text: 'Applied Sections',
items: [
{ text: 'VS Code Setup', link: '/en/applied/vscode' },
{ text: 'Project Structure', link: '/en/applied/project-structure' },
{ text: 'Components', link: '/en/applied/components' },
{ text: 'Page-level Components', link: '/en/applied/page-level' },
{ text: 'Templates & Code Generation', link: '/en/applied/templates-generation' },
{ text: 'Styles', link: '/en/applied/styles' },
{ text: 'Images', link: '/en/applied/images-sprites' },
{ text: 'SVG Sprites', link: '/en/applied/svg-sprites' },
{ text: 'Video', link: '/en/applied/video' },
{ text: 'API', link: '/en/applied/api' },
{ text: 'Stores', link: '/en/applied/stores' },
{ text: 'Hooks', link: '/en/applied/hooks' },
{ text: 'Fonts', link: '/en/applied/fonts' },
{ text: 'Localization', link: '/en/applied/localization' },
],
},
];
export default defineConfig({
srcDir: 'docs',
title: 'NextJS Style Guide',
description: 'Правила и стандарты разработки на NextJS и TypeScript',
rewrites: {
'ru/:rest*': ':rest*',
},
locales: {
root: {
label: 'Русский',
lang: 'ru-RU',
themeConfig: {
sidebar: ruSidebar,
},
},
en: {
label: 'English',
lang: 'en-US',
link: '/en/',
themeConfig: {
sidebar: enSidebar,
},
},
},
});