-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
142 lines (141 loc) · 4.33 KB
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';
import svelte from '@astrojs/svelte';
import starlightSidebarTopics from 'starlight-sidebar-topics';
// https://astro.build/config
export default defineConfig({
site: 'https://svelte.dragomano.ru',
integrations: [starlight({
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: false,
}),
starlightSidebarTopics(
[
{
label: 'Svelte',
link: '/introduction/overview/',
icon: 'open-book',
items: [
{
label: 'Введение',
autogenerate: { directory: 'introduction' },
},
{
label: 'Руны',
autogenerate: { directory: 'runes' },
},
{
label: 'Синтаксис шаблонов',
collapsed: true,
autogenerate: { directory: 'template-syntax' },
},
{
label: 'Стилизация',
autogenerate: { directory: 'styling' },
},
{
label: 'Специальные элементы',
collapsed: true,
autogenerate: { directory: 'special-elements' },
},
{
label: 'Рантайм',
collapsed: true,
autogenerate: { directory: 'runtime' },
},
{
label: 'Разное',
autogenerate: { directory: 'misc' },
},
{
label: 'Справочник',
collapsed: true,
autogenerate: { directory: 'reference' },
},
{
label: 'Обучающие статьи и ролики',
link: 'learning',
},
],
},
{
id: 'kit',
label: 'SvelteKit',
link: '/kit/getting-started/introduction',
icon: 'seti:svelte',
items: [
{
label: 'Начало работы',
autogenerate: { directory: 'kit/getting-started' },
},
{
label: 'Основные концепции',
autogenerate: { directory: 'kit/core-concepts' },
},
],
},
{
id: 'cli',
label: 'Консольные команды',
link: '/cli/introduction/overview',
icon: 'seti:shell',
items: [
{
label: 'Общая информация',
autogenerate: { directory: 'cli/introduction' },
},
{
label: 'Команды',
autogenerate: { directory: 'cli/commands' },
},
],
},
],
),
],
title: 'Svelte по-русски',
description: 'Документация Svelte 5 на русском языке.',
head: [
{
tag: 'meta',
attrs: {
name: 'google-site-verification',
content: 'fq1A8llkn1XRVaPfBInN-TPoDtGsEUQmvEr3QVrEsyI',
},
},
{
tag: 'script',
content: `(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "r5l1g73n2s");`,
},
],
defaultLocale: 'root',
locales: {
root: {
label: 'Русский',
lang: 'ru',
},
},
logo: {
dark: './src/assets/dark_logo.svg',
light: './src/assets/logo.svg',
replacesTitle: true,
alt: 'Логотип Svelte',
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/dragomano/svelte-russian' },
],
editLink: {
baseUrl: 'https://github.com/dragomano/svelte-russian/edit/main/',
},
components: {
LastUpdated: './src/components/LastUpdated.astro',
},
}), svelte()],
});