Files
docs/projects/nextjs-style-guide/docs/docs.config.ts
S.Gromov bdb99ade62
All checks were successful
CI/CD Pipeline / build (push) Successful in 39s
CI/CD Pipeline / docker (push) Successful in 1m30s
CI/CD Pipeline / deploy (push) Successful in 8s
refactor: перенести сборку в проекты
- перенесены каноны и VitePress-конфиги в projects/<slug>

- добавлены корневой и проектные build.ts для сборки артефактов

- добавлены shared-библиотеки сборки в projects/_shared/lib

- обновлены CI, Dockerfile, package.json, gitignore и README

- удалена сборка frontend-агента
2026-05-22 19:07:10 +03:00

202 lines
11 KiB
TypeScript

export const site = {
title: 'NextJS Style Guide',
description: 'Практический стайлгайд для разработки frontend-приложений на Next.js и TypeScript',
base: '/nextjs-style-guide/',
outDir: '../../../public/nextjs-style-guide',
};
/**
* Карта монтирования исходных канонов в VitePress-документацию.
*
* SLM-разделы берутся из проекта `slm-design`, чтобы NextJS-гайд не содержал
* собственных дублей архитектурного канона.
*/
export const mounts = [
{ target: 'index.md', source: 'canons/index.md' },
{ target: 'workflow.md', source: 'canons/workflow.md' },
{ target: 'slm-design/architecture/index.md', source: '../slm-design/canons/architecture/index.md' },
{ target: 'slm-design/architecture/layers.md', source: '../slm-design/canons/architecture/layers.md' },
{ target: 'slm-design/architecture/modules.md', source: '../slm-design/canons/architecture/modules.md' },
{ target: 'slm-design/architecture/segments.md', source: '../slm-design/canons/architecture/segments.md' },
{ target: 'slm-design/architecture/monorepo.md', source: '../slm-design/canons/architecture/monorepo.md' },
{ target: 'slm-design/examples/react/factory.md', source: '../slm-design/canons/examples/react/factory.md' },
{ target: 'slm-design/examples/react/factory-composition.md', source: '../slm-design/canons/examples/react/factory-composition.md' },
{ target: 'slm-design/examples/react/composition-provider.md', source: '../slm-design/canons/examples/react/composition-provider.md' },
{ target: 'basics/tech-stack.md', source: 'canons/basics/tech-stack.md' },
{ target: 'basics/naming.md', source: 'canons/basics/naming.md' },
{ target: 'basics/code-style.md', source: 'canons/basics/code-style.md' },
{ target: 'basics/documentation.md', source: 'canons/basics/documentation.md' },
{ target: 'basics/typing.md', source: 'canons/basics/typing.md' },
{ target: 'applied/creating-project/from-template.md', source: 'canons/applied/creating-project/from-template.md' },
{ target: 'applied/creating-project/manual.md', source: 'canons/applied/creating-project/manual.md' },
{ target: 'applied/creating-project/nextjs.md', source: 'canons/applied/creating-project/nextjs.md' },
{ target: 'applied/project-structure.md', source: 'canons/applied/project-structure.md' },
{ target: 'applied/page-level.md', source: 'canons/applied/page-level.md' },
{ target: 'applied/component.md', source: 'canons/applied/component.md' },
{ target: 'applied/module.md', source: 'canons/applied/module.md' },
{ target: 'applied/rest-client/index.md', source: 'canons/applied/rest-client/index.md' },
{ target: 'applied/rest-client/setup/index.md', source: 'canons/applied/rest-client/setup/index.md' },
{ target: 'applied/rest-client/setup/auto.md', source: 'canons/applied/rest-client/setup/auto.md' },
{ target: 'applied/rest-client/setup/manual.md', source: 'canons/applied/rest-client/setup/manual.md' },
{ target: 'applied/rest-client/setup/hooks.md', source: 'canons/applied/rest-client/setup/hooks.md' },
{ target: 'applied/rest-client/usage.md', source: 'canons/applied/rest-client/usage.md' },
{ target: 'applied/data-fetch/index.md', source: 'canons/applied/data-fetch/index.md' },
{ target: 'applied/data-fetch/server-await.md', source: 'canons/applied/data-fetch/server-await.md' },
{ target: 'applied/data-fetch/parallel-server-requests.md', source: 'canons/applied/data-fetch/parallel-server-requests.md' },
{ target: 'applied/data-fetch/pass-promise-down.md', source: 'canons/applied/data-fetch/pass-promise-down.md' },
{ target: 'applied/data-fetch/client-hooks-initial-data.md', source: 'canons/applied/data-fetch/client-hooks-initial-data.md' },
{ target: 'applied/data-fetch/client-get-hook.md', source: 'canons/applied/data-fetch/client-get-hook.md' },
{ target: 'applied/data-fetch/business-composition.md', source: 'canons/applied/data-fetch/business-composition.md' },
{ target: 'applied/styles/styles-setup.md', source: 'canons/applied/styles/styles-setup.md' },
{ target: 'applied/styles/styles-usage.md', source: 'canons/applied/styles/styles-usage.md' },
{ target: 'applied/svg-sprites/svg-sprites-intro.md', source: 'canons/applied/svg-sprites/svg-sprites-intro.md' },
{ target: 'applied/svg-sprites/svg-sprites-setup.md', source: 'canons/applied/svg-sprites/svg-sprites-setup.md' },
{ target: 'applied/svg-sprites/svg-sprites-usage.md', source: 'canons/applied/svg-sprites/svg-sprites-usage.md' },
{ target: 'applied/images.md', source: 'canons/applied/images.md' },
{ target: 'applied/fonts.md', source: 'canons/applied/fonts.md' },
{ target: 'applied/aliases.md', source: 'canons/applied/aliases.md' },
{ target: 'applied/templates/templates-intro.md', source: 'canons/applied/templates/templates-intro.md' },
{ target: 'applied/templates/templates-setup.md', source: 'canons/applied/templates/templates-setup.md' },
{ target: 'applied/templates/templates-create.md', source: 'canons/applied/templates/templates-create.md' },
{ target: 'applied/templates/templates-usage.md', source: 'canons/applied/templates/templates-usage.md' },
{ target: 'applied/biome.md', source: 'canons/applied/biome.md' },
{ target: 'applied/postcss.md', source: 'canons/applied/postcss.md' },
{ target: 'applied/vscode.md', source: 'canons/applied/vscode.md' },
{ target: 'applied/localization.md', source: 'canons/applied/localization.md' },
{ target: 'applied/stores.md', source: 'canons/applied/stores.md' },
];
export const routeRewrites = [
{ from: '/docs/basics/architecture', to: '/slm-design/architecture' },
{ from: '/architecture', to: '/slm-design/architecture' },
{ from: '/examples', to: '/slm-design/examples' },
];
export const sidebar = [
{
text: 'Подсказки',
link: '/workflow',
},
{
text: 'Архитектура',
items: [
{
text: 'Спецификация SLM',
items: [
{ text: 'Обзор', link: '/slm-design/architecture/' },
{ text: 'Слои', link: '/slm-design/architecture/layers' },
{ text: 'Модули', link: '/slm-design/architecture/modules' },
{ text: 'Сегменты', link: '/slm-design/architecture/segments' },
{ text: 'Монорепозитории', link: '/slm-design/architecture/monorepo' },
],
},
{
text: 'Примеры',
collapsed: true,
items: [
{ text: 'Создание фабрики', link: '/slm-design/examples/react/factory' },
{ text: 'Композиция фабрик', link: '/slm-design/examples/react/factory-composition' },
{ text: 'Композиция через Provider', link: '/slm-design/examples/react/composition-provider' },
],
},
],
},
{
text: 'Базовые правила',
items: [
{ text: 'Технологии и библиотеки', link: '/basics/tech-stack' },
{ text: 'Именование', link: '/basics/naming' },
{ text: 'Стиль кода', link: '/basics/code-style' },
{ text: 'Документирование', link: '/basics/documentation' },
{ text: 'Типизация', link: '/basics/typing' },
],
},
{
text: 'Прикладные разделы',
items: [
{
text: 'Создание проекта',
collapsed: true,
items: [
{ text: 'Из шаблона', link: '/applied/creating-project/from-template' },
{ text: 'По гайду вручную', link: '/applied/creating-project/manual' },
{ text: 'Чистый Next.js', link: '/applied/creating-project/nextjs' },
],
},
{ text: 'Структура проекта', link: '/applied/project-structure' },
{ text: 'Страницы', link: '/applied/page-level' },
{ text: 'Компонент', link: '/applied/component' },
{ text: 'Модуль', link: '/applied/module' },
{
text: 'REST-клиент',
collapsed: true,
items: [
{ text: 'Введение', link: '/applied/rest-client/' },
{
text: 'Настройка',
collapsed: true,
items: [
{ text: 'Обзор', link: '/applied/rest-client/setup/' },
{ text: 'Автогенерация из OpenAPI', link: '/applied/rest-client/setup/auto' },
{ text: 'Ручное создание', link: '/applied/rest-client/setup/manual' },
{ text: 'GET-хуки REST-клиента', link: '/applied/rest-client/setup/hooks' },
],
},
{ text: 'Использование', link: '/applied/rest-client/usage' },
],
},
{
text: 'Получение данных',
collapsed: true,
items: [
{ text: 'Обзор', link: '/applied/data-fetch/' },
{ text: 'Серверный await', link: '/applied/data-fetch/server-await' },
{ text: 'Параллельные серверные запросы', link: '/applied/data-fetch/parallel-server-requests' },
{ text: 'Передача промиса ниже', link: '/applied/data-fetch/pass-promise-down' },
{ text: 'Начальные данные для клиентских хуков', link: '/applied/data-fetch/client-hooks-initial-data' },
{ text: 'Клиентский GET-хук', link: '/applied/data-fetch/client-get-hook' },
{ text: 'Business-композиция', link: '/applied/data-fetch/business-composition' },
],
},
{
text: 'Стили',
collapsed: true,
items: [
{ text: 'Настройка', link: '/applied/styles/styles-setup' },
{ text: 'Использование', link: '/applied/styles/styles-usage' },
],
},
{
text: 'SVG-спрайты',
collapsed: true,
items: [
{ text: 'Введение', link: '/applied/svg-sprites/svg-sprites-intro' },
{ text: 'Настройка', link: '/applied/svg-sprites/svg-sprites-setup' },
{ text: 'Использование', link: '/applied/svg-sprites/svg-sprites-usage' },
],
},
{ text: 'Изображения', link: '/applied/images' },
{ text: 'Шрифты', link: '/applied/fonts' },
{ text: 'Алиасы импортов', link: '/applied/aliases' },
{
text: 'Шаблоны генерации',
collapsed: true,
items: [
{ text: 'Введение', link: '/applied/templates/templates-intro' },
{ text: 'Настройка', link: '/applied/templates/templates-setup' },
{ text: 'Создание шаблонов', link: '/applied/templates/templates-create' },
{ text: 'Использование', link: '/applied/templates/templates-usage' },
],
},
{ text: 'Biome', link: '/applied/biome' },
{ text: 'PostCSS', link: '/applied/postcss' },
{ text: 'VS Code', link: '/applied/vscode' },
{ text: 'Локализация', link: '/applied/localization' },
{ text: 'Stores', link: '/applied/stores' },
],
},
];