Live video on the AT Protocol
1// @ts-check
2import starlight from "@astrojs/starlight";
3import { defineConfig, passthroughImageService } from "astro/config";
4import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
5import starlightSidebarSwipe from "starlight-sidebar-swipe";
6import starlightSidebarTopics from "starlight-sidebar-topics";
7
8// https://astro.build/config
9export default defineConfig({
10 base: "/docs",
11 image: {
12 service: passthroughImageService(),
13 },
14 integrations: [
15 starlight({
16 title: "Streamplace Docs",
17 customCss: [
18 "@fontsource/atkinson-hyperlegible-next/400.css",
19 "@fontsource/atkinson-hyperlegible-next/600.css",
20 "./src/styles/custom-font-face.css",
21 "./src/styles/pre-first-table-col.css",
22 "./src/styles/widths.css",
23 ],
24 social: [
25 {
26 icon: "github",
27 label: "GitHub",
28 href: "https://github.com/streamplace/streamplace",
29 },
30 ],
31 logo: {
32 src: "/src/assets/cube.png",
33 alt: "Streamplace Logo",
34 },
35 favicon: "/favicon.ico",
36 plugins: [
37 //starlightLinksValidator(),
38 starlightSidebarSwipe(),
39 starlightOpenAPI([
40 {
41 base: "/api",
42 label: "Related XRPC API endpoints",
43 schema: "./src/content/docs/lex-reference/openapi.json", // or your json generated from swagger
44 sidebar: {
45 operations: {
46 badges: true,
47 labels: "operationId",
48 },
49 },
50 },
51 ]),
52 starlightSidebarTopics(
53 [
54 {
55 label: "For Streamers & Viewers",
56 link: "/",
57 icon: "open-book",
58 items: [
59 {
60 label: "Start Streaming",
61 autogenerate: { directory: "guides/start-streaming" },
62 },
63 {
64 label: "Features",
65 autogenerate: { directory: "features" },
66 },
67 ],
68 },
69 {
70 label: "For Developers",
71 link: "/developers/",
72 icon: "seti:config",
73 id: "developers",
74 items: [
75 {
76 label: "Start Contributing",
77 autogenerate: { directory: "guides/start-contributing" },
78 },
79 {
80 label: "Installing Streamplace",
81 autogenerate: { directory: "guides/installing" },
82 },
83 {
84 label: "Video Metadata",
85 autogenerate: { directory: "video-metadata" },
86 },
87 {
88 label: "Components",
89 autogenerate: { directory: "components" },
90 },
91 {
92 label: "Localize Streamplace",
93 autogenerate: { directory: "guides/localizing" },
94 },
95 ],
96 },
97 {
98 label: "API Reference",
99 link: "/reference/",
100 icon: "seti:json",
101 id: "ref",
102 items: [
103 {
104 label: "Lexicon Reference",
105 autogenerate: { directory: "lex-reference" },
106 },
107 ...openAPISidebarGroups,
108 ],
109 },
110 ],
111 {
112 topics: {
113 ref: ["/api", "/api/**/*"],
114 },
115 },
116 ),
117 ],
118 }),
119 ],
120});