Skip to content

Commit 7284833

Browse files
committed
feat: Bruno Collection & API Docs
- Added Bruno Collection - Added automation script
1 parent f8e089a commit 7284833

185 files changed

Lines changed: 8559 additions & 409 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

100644100755
File mode changed.

.vitepress/config.mts

100644100755
Lines changed: 103 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,141 @@
1+
import fs from "node:fs";
2+
import path from "node:path";
13
import { defineConfig } from "vitepress";
24

5+
function getApiPages() {
6+
const apiDir = path.resolve("./api");
7+
8+
if (!fs.existsSync(apiDir)) {
9+
return [];
10+
}
11+
12+
return fs
13+
.readdirSync(apiDir, { withFileTypes: true })
14+
.filter(
15+
(entry) =>
16+
entry.isFile() &&
17+
entry.name.endsWith(".md")
18+
)
19+
.map((entry) => {
20+
const name = entry.name.replace(
21+
/\.md$/,
22+
""
23+
);
24+
25+
return {
26+
text:
27+
name.charAt(0).toUpperCase() +
28+
name.slice(1),
29+
30+
link: `/api/${name}`,
31+
};
32+
})
33+
.sort((a, b) =>
34+
a.text.localeCompare(b.text)
35+
);
36+
}
37+
338
export default defineConfig({
439
title: "Berryaudio",
540
description: "Installation, getting started & development docs",
41+
642
themeConfig: {
743
nav: [
844
{ text: "Home", link: "/" },
9-
{ text: "Getting Started", link: "/getting-started/introduction" },
10-
{ text: "Development", link: "/development/architecture" },
11-
{ text: "Community", link: "https://community.berryaudio.org" },
45+
{
46+
text: "Getting Started",
47+
link: "/getting-started/introduction",
48+
},
49+
{
50+
text: "Development",
51+
link: "/development/architecture",
52+
},
53+
{
54+
text: "Community",
55+
link: "https://community.berryaudio.org",
56+
},
1257
],
1358

1459
sidebar: [
1560
{
1661
text: "Getting started",
1762
items: [
18-
{ text: "Introduction", link: "/getting-started/introduction" },
19-
{ text: "Installation & Setup", link: "/getting-started/installation" },
20-
{ text: "Supported Hardware", link: "/getting-started/supported-hardware" },
63+
{
64+
text: "Introduction",
65+
link: "/getting-started/introduction",
66+
},
67+
{
68+
text: "Installation & Setup",
69+
link: "/getting-started/installation",
70+
},
71+
{
72+
text: "Supported Hardware",
73+
link: "/getting-started/supported-hardware",
74+
},
2175
],
2276
},
2377

2478
{
2579
text: "Development",
2680
items: [
27-
{ text: "Architecture", link: "/development/architecture" },
28-
{ text: "Environment", link: "/development/environment" },
29-
{ text: "Extensions", link: "/development/extensions" },
81+
{
82+
text: "Architecture",
83+
link: "/development/architecture",
84+
},
85+
{
86+
text: "Environment",
87+
link: "/development/environment",
88+
},
89+
{
90+
text: "Extensions",
91+
link: "/development/extensions",
92+
},
3093
],
3194
},
95+
3296
{
3397
text: "Display",
3498
items: [
35-
{ text: "Generic HDMI", link: "/display/generic-hdmi" },
36-
{ text: "SSD1322 OLED (256×64)", link: "/display/ssd1322-oled" },
37-
{ text: "SSD1306 OLED (128×64)", link: "/display/ssd1306-oled" },
38-
{ text: 'Waveshare 2.8" DSI LCD (480×640)', link: "/display/waveshare-28-dsi-lcd" },
99+
{
100+
text: "Generic HDMI",
101+
link: "/display/generic-hdmi",
102+
},
103+
{
104+
text: "SSD1322 OLED (256×64)",
105+
link: "/display/ssd1322-oled",
106+
},
107+
{
108+
text: "SSD1306 OLED (128×64)",
109+
link: "/display/ssd1306-oled",
110+
},
111+
{
112+
text: 'Waveshare 2.8" DSI LCD (480×640)',
113+
link: "/display/waveshare-28-dsi-lcd",
114+
},
39115
],
40116
},
41117

42118
{
43-
text: "Extensions",
44-
items: [
45-
{ text: "Bluetooth", link: "/extensions/bluetooth" },
46-
{ text: "Mixer", link: "/extensions/mixer" },
47-
{ text: "Playback", link: "/extensions/playback" },
48-
{ text: "System", link: "/extensions/system" },
49-
{ text: "Spotify", link: "/extensions/spotify" },
50-
{ text: "Airplay", link: "/extensions/airplay" },
51-
{ text: "Snapcast", link: "/extensions/snapcast" },
52-
{ text: "Radio", link: "/extensions/radio" },
53-
{ text: "Network", link: "/extensions/network" },
54-
{ text: "Tracklist", link: "/extensions/tracklist" },
55-
{ text: "Library", link: "/extensions/library" },
56-
{ text: "Storage", link: "/extensions/storage" },
57-
],
119+
text: "API",
120+
items: getApiPages(),
58121
},
59122

60123
{
61124
text: "Community",
62-
items: [{ text: "Forums", link: "https://www.berryaudio.org" }],
125+
items: [
126+
{
127+
text: "Forums",
128+
link: "https://www.berryaudio.org",
129+
},
130+
],
63131
},
64132
],
65133

66-
socialLinks: [{ icon: "github", link: "https://github.com/berry-audio" }],
134+
socialLinks: [
135+
{
136+
icon: "github",
137+
link: "https://github.com/berry-audio",
138+
},
139+
],
67140
},
68141
});

.vitepress/theme/components/ApiCollapse.vue

100644100755
File mode changed.

.vitepress/theme/components/ApiRequest.vue

100644100755
File mode changed.

.vitepress/theme/components/ApiResponse.vue

100644100755
File mode changed.

.vitepress/theme/components/EventCollapse.vue

100644100755
File mode changed.

.vitepress/theme/custom.css

100644100755
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
:root {
22
/* Primary brand color */
3-
--vp-c-brand-1: #87602a; /* main */
4-
--vp-c-brand-2: #6a4b20; /* hover */
5-
--vp-c-brand-3: #87602a; /* soft */
3+
--vp-c-brand-1: #db462b; /* main */
4+
--vp-c-brand-2: #b83a24; /* hover */
5+
--vp-c-brand-3: #db462b; /* soft */
66
}
77

88
/* Optional: dark mode tweaks */
99
.dark {
10-
--vp-c-brand-1: #87602a;
11-
--vp-c-brand-2: #87602a;
12-
--vp-c-brand-3: #87602a;
10+
--vp-c-brand-1: #db462b;
11+
--vp-c-brand-2: #db462b;
12+
--vp-c-brand-3: #db462b;
1313
}
1414

1515
.vp-doc .info strong {
@@ -131,4 +131,14 @@ details[open] .arrow {
131131
width: 100%;
132132
height: auto;
133133
display: block;
134+
}
135+
136+
.vp-doc table {
137+
width: 100%;
138+
display: table;
139+
}
140+
141+
.vp-doc th,
142+
.vp-doc td {
143+
padding: 8px 12px;
134144
}

.vitepress/theme/index.js

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

README.md

100644100755
File mode changed.

0 commit comments

Comments
 (0)