-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathastro.config.mjs
More file actions
121 lines (115 loc) · 2.59 KB
/
astro.config.mjs
File metadata and controls
121 lines (115 loc) · 2.59 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
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'LibreTranslate',
logo: {
src: './src/assets/logo.svg',
replacesTitle: true
},
customCss: [
'./src/styles/custom.css',
],
social: [
{ icon: 'discourse', label: 'Community Forum', href: 'https://community.libretranslate.com' },
{ icon: 'github', label: 'GitHub', href: 'https://github.com/LibreTranslate/' },
{ icon: 'blueSky', label: 'BlueSky', href: 'https://bsky.app/profile/libretranslate.com' }
],
sidebar: [
{
label: "Welcome",
translations: {
it: "Benvenuti",
es: "Bienvenidos",
fr: "Bienvenue"
},
items: [
{ label: "Quickstart",
link: "/",
translations: {
it: "Guida rapida",
es: "Guía rápida",
fr: "Démarrage rapide"
}
},
]
},
{
label: 'Guides',
translations: {
it: 'Guide',
fr: 'Guides',
es: 'Guías'
},
items: [
{ slug: 'guides/installation' },
{ slug: 'guides/api_usage' },
{ slug: 'guides/manage_api_keys' },
{ slug: 'guides/build_from_sources' },
{ slug: 'guides/integrations' },
{ slug: 'guides/supported_languages' },
{ slug: 'guides/contributing' },
{ slug: 'guides/faq' },
]
},
{
label: "Community",
translations: {
it: "Comunità",
fr: "Communauté",
es: "Comunidad"
},
collapsed: true,
items: [
{ slug: 'community/resources' },
{ slug: 'community/mirrors' },
{ slug: 'community/projects' },
]
},
...openAPISidebarGroups,
],
defaultLocale: 'root',
locales: {
// English docs in `src/content/docs/en/`
root: {
label: 'English',
lang: 'en'
},
it: {
label: 'Italiano',
},
fr: {
label: 'Français',
},
es:{
label: 'Español',
},
},
editLink: {
baseUrl: 'https://github.com/LibreTranslate/Documentation/edit/main/',
},
plugins: [
// Generate the OpenAPI documentation pages.
starlightOpenAPI([
{
base: 'api',
schema: 'https://libretranslate.com/spec',
// schema: 'http://localhost:5000/spec',
label: "API Reference",
collapsed: true,
sidebar: {
operations: {
badges: true,
labels: "operationId"
}
}
},
]),
],
}),
],
});