forked from withastro/starlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
119 lines (116 loc) · 3.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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
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' },
};
const site = 'https://starlight.astro.build/';
export default defineConfig({
site,
integrations: [
starlight({
title: 'Starlight',
logo: {
light: '/src/assets/logo-light.svg',
dark: '/src/assets/logo-dark.svg',
replacesTitle: true,
},
editLink: {
baseUrl: 'https://github.com/withastro/starlight/edit/main/docs/',
},
social: {
github: 'https://github.com/withastro/starlight',
discord: 'https://astro.build/chat',
},
head: [
{
tag: 'script',
attrs: {
src: 'https://cdn.usefathom.com/script.js',
'data-site': 'EZBHTSIG',
defer: true,
},
},
{
tag: 'meta',
attrs: { property: 'og:image', content: site + 'og.jpg?v=1' },
},
{
tag: 'meta',
attrs: { property: 'twitter:image', content: site + 'og.jpg?v=1' },
},
],
customCss: process.env.NO_GRADIENTS ? [] : ['/src/assets/landing.css'],
locales,
sidebar: [
{
label: 'Start Here',
translations: {
de: 'Beginne hier',
es: 'Comienza aqui',
ja: 'ここからはじめる',
fr: 'Commencez ici',
it: 'Inizia qui',
},
items: [
{
label: 'Getting Started',
link: 'getting-started',
translations: {
de: 'Erste Schritte',
es: 'Empezando',
ja: '入門',
fr: 'Mise en route',
it: 'Iniziamo',
},
},
{
label: 'Environmental Impact',
link: 'environmental-impact',
translations: {
// de: '',
es: 'Documentación ecológica',
ja: '環境への負荷',
fr: 'Impact environnemental',
it: 'Impatto ambientale',
},
},
{
label: 'Showcase',
link: 'showcase',
translations: {
// de: '',
// es: '',
ja: 'ショーケース',
// fr: '',
// it: '',
},
},
],
},
{
label: 'Guides',
translations: { de: 'Anleitungen', es: 'Guías', ja: 'ガイド', fr: 'Guides', it: "Guide", },
autogenerate: { directory: 'guides' },
},
{
label: 'Reference',
translations: {
de: 'Referenz',
es: 'Referencias',
ja: 'リファレンス',
fr: 'Référence',
it: 'Riferimenti',
},
autogenerate: { directory: 'reference' },
},
],
lastUpdated: true,
}),
],
image: { service: { entrypoint: 'astro/assets/services/sharp' } },
});