VEGA-6128 Генерация ссылок для index старниц

This commit is contained in:
Rusovich Violetta
2025-12-25 14:13:59 +03:00
parent f83c928c47
commit 7fd1755a7d
14 changed files with 592 additions and 89 deletions
+84 -80
View File
@@ -1,6 +1,8 @@
import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import { overrideComponents } from './override-components'
import { autoSectionLinksPlugin } from './plugins/auto-section-links'
import { resolve } from 'path'
const gitlab = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
@@ -39,81 +41,7 @@ const gitlab = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
const new_version = process.env?.VITE_NEW_VERSION;
console.log({ base: typeof new_version !== 'undefined' ? '/' : '/docs/' })
// https://vitepress.dev/reference/site-config
export default defineConfig({
srcDir: ".",
title: " ",
description: "Документация Beeline Cloud",
head: [['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/bee-favicon.png' }]],
base: typeof new_version !== 'undefined' ? '/' : '/docs/',
markdown: {
config(md) {
md.use(tabsMarkdownPlugin)
}
},
vite: {
resolve: {
alias: overrideComponents(),
}
},
locales: {
root: {
label: 'Русский',
lang: 'ru',
}
},
themeConfig: {
logo: {
light: '/img/logo-cloud.svg',
dark: '/img/logo-cloud.svg',
alt: '',
},
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'По вашему запросу ничего не найдено',
resetButtonTitle: 'Сбросить',
}
}
}
}
}
},
// https://vitepress.dev/reference/default-theme-config
// nav: [
// {
// text: 'Документация',
// link: '/guide/',
// },
// {
// text: 'API',
// link: '',
// },
// {
// text: 'Terraform',
// // link: '/terraform/',
// link: '',
// },
// ],
docFooter: {
next: 'Вперед',
prev: 'Назад'
},
outline: {
label: 'Содержание'
},
sidebar: {
const sidebarConfig = {
'/platform/': [
{
text: 'Платформа Beeline Cloud', link: '/platform/index.md',
@@ -140,11 +68,10 @@ export default defineConfig({
text: 'Резервное копирование', link: '/backups/index.md',
},
{
text: 'Обзор сервиса', link: '/backups/backups-overview.md',
text: 'Обзор сервиса', link: '/backups/about.md',
collapsed: true,
items: [
{text: 'О сервисе', link: '/backups/about.md'},
{text: 'Квоты и лимиты', link: '/backups/backup-quatos.md'},
{text: 'Квоты и лимиты', link: '/backups/backup-quatos.md'},
]
},
{text: 'Резервное копирование виртуальных машин Beeline Cloud', link: '/backups/backup-internal-infra.md'},
@@ -216,7 +143,6 @@ export default defineConfig({
{ text: 'Настройка site-to-site подключения с помощью IPSec', link: '/vdc/vdc-how-to/networks/how-to-setup-ipsec-vpn.md',
collapsed: true,
items: [
{text: 'Настройка IPSec VPN', link: '/vdc/vdc-how-to/networks/ipsec/setup-ipsec-vpn.md'},
{text: 'Настройка ASAv', link: '/vdc/vdc-how-to/networks/ipsec/asav.md'},
{text: 'Настройка CSR 1000v', link: '/vdc/vdc-how-to/networks/ipsec/csr1000v.md'},
{text: 'Настройка Fortigate', link: '/vdc/vdc-how-to/networks/ipsec/fortigate.md'},
@@ -321,7 +247,85 @@ export default defineConfig({
text: 'Подключение к виртуальному рабочему месту', link: '/vdi/vdi-how-to/vdi-connect.md'
},
],
},
}
// https://vitepress.dev/reference/site-config
export default defineConfig({
srcDir: ".",
title: " ",
description: "Документация Beeline Cloud",
head: [['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/bee-favicon.png' }]],
base: typeof new_version !== 'undefined' ? '/' : '/docs/',
markdown: {
config(md) {
md.use(tabsMarkdownPlugin)
}
},
vite: {
resolve: {
alias: overrideComponents(),
},
plugins: [
autoSectionLinksPlugin(resolve(__dirname, '..'), sidebarConfig) as any,
]
},
locales: {
root: {
label: 'Русский',
lang: 'ru',
}
},
themeConfig: {
logo: {
light: '/img/logo-cloud.svg',
dark: '/img/logo-cloud.svg',
alt: '',
},
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'По вашему запросу ничего не найдено',
resetButtonTitle: 'Сбросить',
}
}
}
}
}
},
// https://vitepress.dev/reference/default-theme-config
// nav: [
// {
// text: 'Документация',
// link: '/guide/',
// },
// {
// text: 'API',
// link: '',
// },
// {
// text: 'Terraform',
// // link: '/terraform/',
// link: '',
// },
// ],
docFooter: {
next: 'Вперед',
prev: 'Назад'
},
outline: {
label: 'Содержание'
},
sidebar: sidebarConfig,
},
}
)