118 lines
4.4 KiB
TypeScript
118 lines
4.4 KiB
TypeScript
import { defineConfig } from 'vitepress';
|
||
|
||
const ruSidebar = [
|
||
{
|
||
text: 'Workflow',
|
||
items: [
|
||
{ text: 'Начало работы', link: '/workflow/getting-started' },
|
||
{ text: 'Создание приложения', link: '/workflow/creating-app' },
|
||
{ text: 'Создание страниц', link: '/workflow/creating-pages' },
|
||
{ text: 'Создание компонентов', link: '/workflow/creating-components' },
|
||
{ text: 'Стилизация', link: '/workflow/styling' },
|
||
{ text: 'Работа с данными', link: '/workflow/data-fetching' },
|
||
{ text: 'Управление состоянием', link: '/workflow/state-management' },
|
||
{ text: 'Локализация', link: '/workflow/localization' },
|
||
],
|
||
},
|
||
{
|
||
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: 'Структура проекта', link: '/applied/project-structure' },
|
||
{ text: 'Компоненты', link: '/applied/components' },
|
||
{ 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: 'Project Structure', link: '/en/applied/project-structure' },
|
||
{ text: 'Components', link: '/en/applied/components' },
|
||
{ 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,
|
||
},
|
||
},
|
||
},
|
||
});
|