-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathastro.config.mjs
More file actions
222 lines (220 loc) · 7.53 KB
/
astro.config.mjs
File metadata and controls
222 lines (220 loc) · 7.53 KB
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
// @ts-check
import { defineConfig } from 'astro/config';
import { sidebarTopics } from './sidebar.topics';
import catppuccin from "@catppuccin/starlight";
import lunaria from '@lunariajs/starlight';
import mermaid from 'astro-mermaid';
import starlight from '@astrojs/starlight';
import starlightGiscus from 'starlight-giscus';
import starlightGitHubAlerts from 'starlight-github-alerts';
import starlightImageZoom from 'starlight-image-zoom';
import starlightKbd from 'starlight-kbd';
import starlightLinksValidator from 'starlight-links-validator';
import starlightLlmsTxt from 'starlight-llms-txt';
import starlightScrollToTop from 'starlight-scroll-to-top';
import starlightSidebarTopics from 'starlight-sidebar-topics';
// Localization: https://lunaria.dev/
export const locales = {
root: { label: 'English', lang: 'en' },
de: { label: 'Deutsch', lang: 'de' },
es: { label: 'Español', lang: 'es' },
ja: { label: '日本語', lang: 'ja' },
fr: { label: 'Français', lang: 'fr' },
it: { label: 'Italiano', lang: 'it' },
id: { label: 'Bahasa Indonesia', lang: 'id' },
'zh-cn': { label: '简体中文', lang: 'zh-CN' },
'pt-br': { label: 'Português do Brasil', lang: 'pt-BR' },
'pt-pt': { label: 'Português', lang: 'pt-PT' },
ko: { label: '한국어', lang: 'ko' },
tr: { label: 'Türkçe', lang: 'tr' },
ru: { label: 'Русский', lang: 'ru' },
hi: { label: 'हिंदी', lang: 'hi' },
da: { label: 'Dansk', lang: 'da' },
uk: { label: 'Українська', lang: 'uk' },
};
// https://astro.build/config
export default defineConfig({
prefetch: true,
site: 'https://aspire.dev',
trailingSlash: 'always',
redirects: {
'/install.sh': 'https://aka.ms/aspire/get/install.sh',
'/install.ps1': 'https://aka.ms/aspire/get/install.ps1',
},
integrations: [
mermaid({
theme: 'forest',
autoTheme: true,
iconPacks: [
{
// Search: https://icon-sets.iconify.design/logos/?keyword=svg+logos
name: 'logos',
loader: () => fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then(res => res.json())
},
{
// Search: // https://icon-sets.iconify.design/iconoir/?keyword=iconoir
name: 'iconoir',
loader: () => fetch('https://unpkg.com/@iconify-json/iconoir@1/icons.json').then(res => res.json())
}
]
}),
starlight({
title: 'Aspire',
defaultLocale: 'root',
locales,
logo: {
src: './src/assets/aspire-logo-32.svg',
replacesTitle: true
},
editLink: {
baseUrl: 'https://github.com/microsoft/aspire.dev/edit/main/src/frontend/',
},
favicon: 'favicon.svg',
head: [
{ tag: 'meta', attrs: { property: 'og:title', content: 'Aspire—Your Stack, Streamlined' } },
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://aspiredev.netlify.app/og-image.png' } },
{ tag: 'meta', attrs: { property: 'twitter:domain', content: 'aspire.dev' } },
{ tag: 'meta', attrs: { property: 'twitter:url', content: 'https://aspire.dev' } },
{ tag: 'meta', attrs: { name: 'twitter:title', content: 'Aspire—Your Stack, Streamlined' } },
{ tag: 'meta', attrs: { name: 'twitter:description', content: 'Add Aspire to your stack and streamline your development workflow with code-first control, modularity, and observability.' } },
{ tag: 'meta', attrs: { name: 'twitter:image', content: 'https://aspiredev.netlify.app/og-image.png' } },
{ tag: 'link', attrs: { rel: 'icon', type: 'image/png', href: '/favicon-96x96.png', sizes: '96x96' } },
{ tag: 'link', attrs: { rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' } },
{ tag: 'link', attrs: { rel: 'shortcut icon', href: '/favicon.ico' } },
{ tag: 'link', attrs: { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' } },
{ tag: 'meta', attrs: { name: 'apple-mobile-web-app-title', content: 'Aspire' } },
{ tag: 'link', attrs: { rel: 'alternate', type: 'application/rss+xml', title: 'Aspire Docs RSS', href: '/rss.xml' } },
{ tag: 'script', attrs: { src: 'https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.min.js', defer: true } },
{ tag: 'script', attrs: { src: '/1ds/', defer: true } }
],
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://github.com/dotnet/aspire'
},
{
icon: 'discord',
label: 'Discord',
href: 'https://discord.com/invite/raNPcaaSj8'
},
{
icon: 'x.com',
label: 'X',
href: 'https://x.com/aspiredotdev'
},
{
icon: 'blueSky',
label: 'BlueSky',
href: 'https://bsky.app/profile/aspire.dev'
},
{
icon: 'youtube',
label: 'YouTube',
href: 'https://www.youtube.com/@aspiredotdev'
},
{
icon: 'twitch',
label: 'Twitch',
href: 'https://www.twitch.tv/aspiredotdev'
}
],
customCss: [
'@fontsource-variable/outfit',
'./src/styles/site.css',
],
components: {
EditLink: './src/components/starlight/EditLink.astro',
Footer: './src/components/starlight/Footer.astro',
Head: './src/components/starlight/Head.astro',
Header: './src/components/starlight/Header.astro',
Hero: './src/components/starlight/Hero.astro',
MarkdownContent: './src/components/starlight/MarkdownContent.astro',
Pagination: './src/components/starlight/Pagination.astro',
Search: './src/components/starlight/Search.astro',
Sidebar: './src/components/starlight/Sidebar.astro',
SocialIcons: './src/components/starlight/SocialIcons.astro',
},
expressiveCode: {
// https://expressive-code.com/guides/themes/#using-bundled-themes
themes: ['laserwave', 'slack-ochin'],
styleOverrides: { borderRadius: '0.5rem', codeFontSize: '1rem' }
},
plugins: [
lunaria({
route: "/i18n",
sync: false
}),
catppuccin(),
starlightSidebarTopics(sidebarTopics, {
exclude: ['**/includes/**/*']
}),
...(process.env.CHECK_LINKS
? [starlightLinksValidator({
errorOnRelativeLinks: false,
errorOnFallbackPages: false
})]
: []),
starlightScrollToTop({
// https://frostybee.github.io/starlight-scroll-to-top/svg-paths/
svgPath: 'M4 16L12 8L20 16',
showTooltip: true,
threshold: 10,
showOnHomepage: true,
tooltipText: {
da: 'Rul op',
de: 'Nach oben scrollen',
en: 'Scroll to top',
es: 'Ir arriba',
fr: 'Retour en haut',
hi: 'ऊपर स्क्रॉल करें',
id: 'Gulir ke atas',
it: 'Torna su',
ja: 'トップへ戻る',
ko: '맨 위로',
'pt-br': 'Voltar ao topo',
'pt-pt': 'Voltar ao início',
ru: 'Наверх',
tr: 'Başa dön',
uk: 'Прокрутити вгору',
'zh-cn': '回到顶部',
}
}),
starlightGitHubAlerts(),
starlightLlmsTxt({
projectName: 'Aspire',
description: 'Aspire is a polyglot local dev-time orchestration tool chain for building, running, debugging, and deploying distributed applications.',
exclude: [
'reference/api/**',
'/reference/api/**',
'**/api/**'
]
}),
starlightImageZoom({
showCaptions: true
}),
starlightKbd({
types: [
{ id: 'mac', label: 'macOS' },
{ id: 'windows', label: 'Windows', default: true },
{ id: 'linux', label: 'Linux' },
],
}),
starlightGiscus({
repo: 'IEvangelist/aspire-docs-discussions',
repoId: 'R_kgDOPYdXEQ',
category: 'General',
categoryId: 'DIC_kwDOPYdXEc4Ctyny',
mapping: 'pathname',
inputPosition: 'bottom',
reactions: true,
lazy: true,
theme: {
light: 'catppuccin_latte',
dark: 'catppuccin_mocha'
}
})
],
}),
]
});