forked from sm1ky/marzban-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
101 lines (99 loc) · 2.73 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
import { defineConfig, passthroughImageService } from "astro/config";
import starlight from "@astrojs/starlight";
import { rehypeHeadingIds } from "@astrojs/markdown-remark";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeExternalLinks from "rehype-external-links";
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
export default defineConfig({
site: "https://marzban-docs.sm1ky.com",
// image: {
// service: passthroughImageService()
// },
integrations: [
starlight({
title: "Marzban",
plugins: [
starlightOpenAPI([
{
base: "api",
label: "API",
schema: "./src/api/openapi.json",
},
]),
],
editLink: {
baseUrl: "https://github.com/sm1ky/marzban-docs/edit/master",
},
components: {
Sidebar: "./src/components/Sidebar.astro",
Head: "./src/components/Head.astro",
},
favicon: "/public/favicon.ico",
customCss: ["./src/styles/headings.css"],
defaultLocale: "root",
locales: {
root: {
label: "Русский",
lang: "ru",
},
},
logo: {
light: "/src/assets/logo-light.svg",
dark: "/src/assets/logo-dark.svg",
replacesTitle: true,
},
social: {
github: "https://github.com/Gozargah/Marzban",
telegram: "https://t.me/gozargah_marzban",
},
pagefind: true,
sidebar: [
{
label: "Первые шаги",
autogenerate: { directory: "start" },
},
{
label: "Интерфейс",
autogenerate: { directory: "ui" },
},
{
label: "Расширенная настройка",
autogenerate: { directory: "advanced" },
},
{
label: "Компоненты",
items: [
...openAPISidebarGroups,
{ label: "Узлы", link: "components/marzban_node/" },
{ label: "Подписки", link: "components/subscriptions/" },
{ label: "Telegram бот", link: "components/telegram_bot/" },
{ label: "CLI", link: "components/cli/" },
{ label: "WebHook", link: "components/webhook/" },
],
},
{
label: "Руководства",
autogenerate: { directory: "tutorials" },
},
],
}),
],
markdown: {
rehypePlugins: [
rehypeHeadingIds,
rehypeExternalLinks,
[
rehypeAutolinkHeadings,
{
behavior: "wrap",
},
],
[
rehypeExternalLinks,
{
content: { type: "text", value: " ↗" },
},
],
],
},
});