-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Copy pathastro.config.mjs
194 lines (192 loc) · 3.94 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';
import tailwind from '@astrojs/tailwind';
const site = 'https://bloclibrary.dev/';
const locales = {
root: {
label: 'English',
lang: 'en',
},
az: {
label: 'Azərbaycan',
lang: 'az',
},
cs: {
label: 'čeština',
lang: 'cs',
},
de: {
label: 'Deutsch',
lang: 'de',
},
es: {
label: 'Español',
lang: 'es',
},
fr: {
label: 'Français',
lang: 'fr',
},
ja: {
label: '日本語',
lang: 'ja',
},
ko: {
label: '한국인',
lang: 'ko',
},
'pt-br': {
label: 'Português',
lang: 'pt-BR',
},
ru: {
label: 'Русский',
lang: 'ru',
},
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
};
// https://astro.build/config
export default defineConfig({
site,
integrations: [
starlight({
expressiveCode: {
themes: ['dark-plus', 'github-light'],
},
logo: {
light: 'src/assets/light-bloc-logo.svg',
dark: 'src/assets/dark-bloc-logo.svg',
replacesTitle: true,
},
title: 'Bloc',
editLink: {
baseUrl: 'https://github.com/felangel/bloc/edit/master/docs/',
},
tagline: 'A predictable state management library for Dart.',
favicon: 'favicon.ico',
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: site + 'og.png?v=1' },
},
{
tag: 'meta',
attrs: { property: 'twitter:image', content: site + 'og.png?v=1' },
},
],
customCss: ['src/tailwind.css', 'src/styles/landing.css', '@fontsource-variable/figtree'],
social: {
github: 'https://github.com/felangel/bloc',
discord: 'https://discord.gg/bloc',
},
defaultLocale: 'root',
locales,
sidebar: [
{
label: 'Introduction',
items: [
{
label: 'Getting Started',
link: '/getting-started',
},
{
label: 'Why Bloc?',
link: '/why-bloc',
},
{
label: 'Bloc Concepts',
link: '/bloc-concepts',
},
{
label: 'Flutter Bloc Concepts',
link: '/flutter-bloc-concepts',
},
{
label: 'Architecture',
link: '/architecture',
},
{
label: 'Testing',
link: '/testing',
},
{
label: 'Naming Conventions',
link: '/naming-conventions',
},
{
label: 'FAQs',
link: '/faqs',
},
{
label: 'Migration Guide',
link: '/migration',
},
],
},
{
label: 'Tutorials',
autogenerate: {
directory: 'tutorials',
},
},
{
label: 'Tools',
items: [
{
label: 'IntelliJ Plugin',
link: 'https://plugins.jetbrains.com/plugin/12129-bloc',
},
{
label: 'VSCode Extension',
link: 'https://marketplace.visualstudio.com/items?itemName=FelixAngelov.bloc',
},
],
},
{
label: 'Reference',
items: [
{
label: 'angular_bloc',
link: 'https://pub.dev/documentation/angular_bloc/latest/index.html',
},
{
label: 'bloc',
link: 'https://pub.dev/documentation/bloc/latest/index.html',
},
{
label: 'bloc_concurrency',
link: 'https://pub.dev/documentation/bloc_concurrency/latest/index.html',
},
{
label: 'bloc_test',
link: 'https://pub.dev/documentation/bloc_test/latest/index.html',
},
{
label: 'flutter_bloc',
link: 'https://pub.dev/documentation/flutter_bloc/latest/index.html',
},
{
label: 'hydrated_bloc',
link: 'https://pub.dev/documentation/hydrated_bloc/latest/index.html',
},
{
label: 'replay_bloc',
link: 'https://pub.dev/documentation/replay_bloc/latest/index.html',
},
],
},
],
plugins: [
starlightLinksValidator({
errorOnFallbackPages: false,
errorOnInconsistentLocale: true,
}),
],
}),
tailwind({ applyBaseStyles: false }),
],
});