-
Notifications
You must be signed in to change notification settings - Fork 24
/
astro.config.mjs
193 lines (190 loc) · 5.28 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
// cspell:words astro astrojs rehype
import { defineConfig } from 'astro/config';
import rehypeSlug from 'rehype-slug';
import { rehypeAutolink } from './plugins/rehype-autolink';
import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
import starlightLinksValidator from 'starlight-links-validator';
const site = 'https://docs.shorebird.dev/';
// https://astro.build/config
export default defineConfig({
site,
integrations: [
starlight({
title: 'Shorebird',
tagline: 'Flutter Code Push',
logo: {
light: './src/assets/shorebird-light.svg',
dark: './src/assets/shorebird-dark.svg',
replacesTitle: true,
},
social: {
github: 'https://github.com/shorebirdtech/shorebird',
discord: 'https://discord.gg/shorebird',
},
editLink: {
baseUrl: 'https://github.com/shorebirdtech/docs/edit/main/',
},
favicon: 'favicon.svg',
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: site + 'open-graph.png?v=1' },
},
{
tag: 'meta',
attrs: {
property: 'twitter:image',
content: site + 'open-graph.png?v=1',
},
},
],
components: {
Head: './src/components/starlight/Head.astro',
MarkdownContent: './src/components/starlight/MarkdownContent.astro',
},
customCss: ['./src/tailwind.css'],
expressiveCode: {
themes: ['dark-plus', 'github-light'],
},
sidebar: [
{
label: 'Getting Started',
link: '/',
},
{
label: 'Code Push',
autogenerate: {
directory: 'code-push',
},
},
{
label: 'Guides',
items: [
{
label: 'Staging Patches',
link: '/guides/staging-patches',
},
{
label: 'Development Workflow',
link: '/guides/development-workflow',
},
{
label: 'Patch Signing (beta)',
link: '/guides/patch-signing',
},
{
label: 'Crash Reporting',
link: '/guides/crash-reporting',
},
{
label: 'Percentage-Based Rollouts',
link: '/guides/percentage-based-rollouts',
},
{
label: 'Flavors',
autogenerate: {
directory: 'guides/flavors',
},
},
{
label: 'Submitting to Stores',
autogenerate: {
directory: 'guides/submitting',
},
},
{
label: 'Hybrid Apps',
autogenerate: {
directory: 'guides/hybrid-apps',
},
},
],
},
{
label: 'Continuous Integration',
autogenerate: {
directory: 'ci',
},
},
{
label: 'Crash Reporting',
autogenerate: {
directory: 'guides/crash-reporting',
},
},
{
label: 'Flutter Version',
link: '/flutter-version',
},
{
label: 'Organizations',
link: '/orgs',
},
{
label: 'Update Strategies',
link: '/update-strategies',
},
{
label: 'FAQ',
link: '/faq',
},
{
label: 'Status',
link: '/status',
},
{
label: 'Billing',
link: '/billing',
},
{
label: 'Architecture',
link: '/architecture',
},
{
label: 'Uninstall',
link: '/uninstall',
},
{
label: 'Troubleshooting',
link: '/troubleshooting',
},
],
plugins: [
starlightLinksValidator({
errorOnFallbackPages: false,
errorOnInconsistentLocale: true,
}),
],
}),
tailwind({ applyBaseStyles: false }),
],
markdown: {
rehypePlugins: [rehypeSlug, ...rehypeAutolink()],
},
redirects: {
// Redirects to preserve legacy URLs.
'/ci': '/ci/github',
'/code_push/initialize': 'code-push/initialize/',
'/code_push/patch': 'code-push/patch/',
'/code_push/preview': 'code-push/preview/',
'/code_push/release': 'code-push/release/',
'/code_push/run': 'code-push/preview',
'/concepts': '/code-push/overview',
'/guides': '/',
'/guides/add-to-app/ios': 'guides/hybrid-apps/ios',
'/guides/code_push_add_to_app': 'guides/hybrid-apps/android',
'/guides/code_push_quickstart': 'guides/code-push-quickstart',
'/guides/crash-reporting': 'guides/crash-reporting/uploading-symbols',
'/guides/fastlane': 'ci/fastlane',
'/guides/flavors': 'guides/flavors/android',
'/guides/code-push-quickstart': '/',
'/guides/hybrid-app': 'guides/hybrid-apps/android',
'/guides/hybrid-app/android': 'guides/hybrid-apps/android',
'/guides/hybrid-app/ios': 'guides/hybrid-apps/ios',
'/guides/release/android': 'guides/submitting/play-store',
'/guides/release/ios': 'guides/submitting/app-store',
'/overview': '/code-push/overview',
'/teams': 'orgs',
},
});