Files
slm-design/site/.vitepress/config.mts

131 lines
4.4 KiB
TypeScript
Raw Permalink Normal View History

2026-07-25 17:56:16 +03:00
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitepress'
2026-08-01 09:31:08 +03:00
import { slugifyHeading } from '../../scripts/lib/slugify-heading.mjs'
2026-07-25 17:56:16 +03:00
const repositoryUrl = 'https://github.com/gromlab-ru/slm-design'
const viteConfigPath = fileURLToPath(new URL('../vite.config.mts', import.meta.url))
2026-07-30 10:56:48 +03:00
const documentationSidebar = [
2026-07-25 17:56:16 +03:00
{
2026-08-10 09:12:22 +03:00
text: 'Архитектурная модель',
2026-07-25 17:56:16 +03:00
items: [
2026-08-10 09:12:22 +03:00
{ text: 'Владение и структура', link: '/architecture/' },
2026-08-10 12:37:32 +03:00
{ text: 'Слои', link: '/architecture/layers' },
{ text: 'Группы', link: '/architecture/groups' },
2026-08-10 14:42:29 +03:00
{ text: 'Модули', link: '/architecture/modules' },
{ text: 'Домены', link: '/architecture/domains' },
2026-08-10 09:12:22 +03:00
{ text: 'Сегменты', link: '/architecture/segments' },
2026-08-10 12:37:32 +03:00
{ text: 'Зависимости', link: '/architecture/dependencies' },
2026-07-25 17:56:16 +03:00
],
},
2026-07-30 10:56:48 +03:00
{
2026-08-10 09:12:22 +03:00
text: 'Нормативная часть',
2026-07-30 10:56:48 +03:00
items: [
2026-08-10 09:12:22 +03:00
{ text: 'Устройство правил', link: '/rules/' },
{ text: 'Реестр правил', link: '/rules/registry' },
2026-07-30 13:22:45 +03:00
],
},
2026-07-25 17:56:16 +03:00
{
2026-08-10 09:12:22 +03:00
text: 'Справочные материалы',
2026-07-25 17:56:16 +03:00
items: [
2026-08-10 09:12:22 +03:00
{ text: 'Терминология', link: '/reference/terminology' },
{ text: 'Проверка архитектуры', link: '/reference/validation' },
2026-07-25 17:56:16 +03:00
],
},
]
2026-07-25 17:56:16 +03:00
export default defineConfig({
2026-08-10 09:12:22 +03:00
srcDir: '../docs',
rewrites: {
2026-08-10 09:12:22 +03:00
'README.md': 'index.md',
'architecture/README.md': 'architecture/index.md',
'rules/README.md': 'rules/index.md',
},
2026-07-25 17:56:16 +03:00
title: 'SLM Design',
2026-08-10 09:12:22 +03:00
description: 'Архитектура фронтенд-приложений с явным владением ответственностями',
lang: 'ru-RU',
2026-07-25 17:56:16 +03:00
base: '/slm-design/',
cleanUrls: true,
lastUpdated: true,
sitemap: {
hostname: 'https://gromlab-ru.github.io/slm-design/',
},
head: [
['link', { rel: 'icon', type: 'image/svg+xml', href: '/slm-design/logo.svg' }],
['meta', { name: 'theme-color', content: '#d97706' }],
],
markdown: {
anchor: {
slugify: slugifyHeading,
},
2026-07-25 17:56:16 +03:00
},
vite: {
configFile: viteConfigPath,
},
themeConfig: {
logo: '/logo.svg',
siteTitle: 'SLM Design',
nav: [
2026-08-10 09:12:22 +03:00
{ text: 'Архитектура', link: '/architecture/' },
2026-07-30 10:56:48 +03:00
{ text: 'Правила', link: '/rules/' },
2026-08-10 09:12:22 +03:00
{ text: 'Проверка', link: '/reference/validation' },
2026-07-25 17:56:16 +03:00
],
2026-07-30 10:56:48 +03:00
sidebar: documentationSidebar,
2026-07-25 17:56:16 +03:00
socialLinks: [{ icon: 'github', link: repositoryUrl }],
search: {
provider: 'local',
options: {
detailedView: false,
disableQueryPersistence: true,
translations: {
button: {
2026-08-10 09:12:22 +03:00
buttonText: 'Найти в SLM',
buttonAriaLabel: 'Искать по архитектуре, терминам и правилам',
},
modal: {
2026-08-10 09:12:22 +03:00
displayDetails: 'Показать контекст',
resetButtonTitle: 'Очистить запрос',
backButtonTitle: 'Закрыть',
noResultsText: 'Совпадений нет',
footer: {
selectText: 'выбрать',
navigateText: 'перейти',
closeText: 'закрыть',
2026-07-25 17:56:16 +03:00
},
},
},
},
},
2026-08-10 09:12:22 +03:00
outline: { level: [2, 3], label: 'В этом разделе' },
notFound: {
code: '404',
2026-08-10 09:12:22 +03:00
title: 'Такой страницы нет',
quote: 'Этот путь не относится к текущей структуре документации.',
linkLabel: 'Открыть главную страницу',
linkText: 'К началу документации',
2026-07-25 17:56:16 +03:00
},
editLink: {
2026-08-10 09:12:22 +03:00
pattern: `${repositoryUrl}/edit/master/docs/:path`,
text: 'Уточнить документацию',
},
lastUpdated: {
2026-08-10 09:12:22 +03:00
text: 'Последнее изменение',
formatOptions: { dateStyle: 'medium' },
},
docFooter: {
2026-08-10 09:12:22 +03:00
prev: 'Назад',
next: 'Далее',
},
darkModeSwitchLabel: 'Оформление',
lightModeSwitchTitle: 'Светлая тема',
darkModeSwitchTitle: 'Тёмная тема',
sidebarMenuLabel: 'Содержание',
returnToTopLabel: 'Наверх',
skipToContentLabel: 'Перейти к содержанию',
footer: {
2026-08-10 09:12:22 +03:00
message: 'Документация SLM Design',
copyright: 'Открытая архитектурная модель',
2026-07-25 17:56:16 +03:00
},
},
})