Skip to content

Commit 8d1e78a

Browse files
committed
Integrate VitePress for documentation
Remove existing Markdown documentation files in favor of a new VitePress setup. This commit introduces the necessary dependencies and scripts to build and serve the new documentation.
1 parent 134836f commit 8d1e78a

File tree

11 files changed

+515
-14
lines changed

11 files changed

+515
-14
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v2
28+
with:
29+
bun-version: latest
30+
31+
- name: Install dependencies
32+
run: bun install
33+
34+
- name: Build with VitePress
35+
run: bun run docs:build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: docs/.vitepress/dist
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
needs: build
50+
runs-on: ubuntu-latest
51+
name: Deploy
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

bun.lock

Lines changed: 343 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vitepress/config.mts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
base: '/lavamusic/',
6+
title: "LavaMusic",
7+
description: "A professional music bot documentation site.",
8+
themeConfig: {
9+
// https://vitepress.dev/reference/default-theme-config
10+
nav: [
11+
{ text: 'Home', link: '/' },
12+
{ text: 'Guide', link: '/installation' },
13+
{ text: 'Commands', link: '/commands' }
14+
],
15+
16+
sidebar: [
17+
{
18+
text: 'Introduction',
19+
items: [
20+
{ text: 'Installation', link: '/installation' },
21+
{ text: 'Configuration', link: '/configuration' },
22+
{ text: 'Docker Setup', link: '/docker' },
23+
]
24+
},
25+
{
26+
text: 'Customization',
27+
items: [
28+
{ text: 'Commands List', link: '/commands' },
29+
{ text: 'Translation', link: '/translation' },
30+
]
31+
}
32+
],
33+
34+
socialLinks: [
35+
{ icon: 'github', link: 'https://github.com/appujet/lavamusic' }
36+
],
37+
38+
footer: {
39+
message: 'Released under the GPL-3.0 License.',
40+
copyright: 'Copyright © 2024-present appujet'
41+
},
42+
43+
search: {
44+
provider: 'local'
45+
}
46+
}
47+
})
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/index.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: home
3+
4+
hero:
5+
name: "LavaMusic"
6+
text: "The Most Powerful Music Bot"
7+
tagline: "Experience high-quality music streaming with ease. Support for YouTube, Spotify, Soundcloud, and more."
8+
image:
9+
src: /logo.png
10+
alt: LavaMusic Logo
11+
actions:
12+
- theme: brand
13+
text: Get Started
14+
link: /installation
15+
- theme: alt
16+
text: Configuration
17+
link: /configuration
18+
- theme: alt
19+
text: Translation
20+
link: /translation
21+
- theme: alt
22+
text: GitHub
23+
link: https://github.com/appujet/lavamusic
24+
25+
features:
26+
- icon: 🎵
27+
title: High Quality
28+
details: Crystals clear audio quality using Lavalink and Discord.js.
29+
- icon: 🌍
30+
title: Multilingual
31+
details: Supports multiple languages including English, French, German, and more.
32+
- icon: 🐳
33+
title: Docker Support
34+
details: Easily deploy using Docker and Docker Compose.
35+
- icon: ⚙️
36+
title: Highly Configurable
37+
details: Custom prefixes, DJ roles, and advanced player settings.
38+
---
Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Getting Lavamusic up and running is easy as pie, even if you are new to this! Fo
77
## 🛠️ Quick Prerequisites
88

99
Before we dive in, make sure you have these ready:
10+
1011
- **Bun** ([download here](https://bun.sh/))
1112
> According to the official website, Bun is a fast all-in-one JavaScript runtime.
1213
@@ -22,14 +23,18 @@ Got them? Great! Let's get Lavamusic grooving in no time.
2223
## 📋 Step-by-Step Setup (We're Here to Help!)
2324

2425
### 1. Grab the Code
26+
2527
Open your terminal and run:
28+
2629
```bash
2730
git clone https://github.com/botxlab/lavamusic.git
2831
cd lavamusic
2932
```
3033

3134
### 2. Install the Goodies
35+
3236
Pick your favorite package manager:
37+
3338
```bash
3439
# Using bun (Recommended)
3540
bun install
@@ -45,12 +50,15 @@ yarn install
4550
```
4651

4752
### 3. Set Up Your Environment
53+
4854
Create your config file:
55+
4956
```bash
5057
cp .env.example .env
5158
```
5259

53-
Now, edit `.env` in your favorite text editor. See **[Configuration Guide](CONFIGURATION.md)** for detailed options.
60+
Now, edit `.env` in your favorite text editor. See **[Configuration Guide](configuration.md)** for detailed options.
61+
5462
```env
5563
TOKEN="your_bot_token_here"
5664
CLIENT_ID="your_bot_client_id"
@@ -59,7 +67,9 @@ DATABASE_URL="file:./lavamusic.db" # SQLite is fine for starters, or use Postgr
5967
```
6068

6169
### 4. Get Lavalink Ready (Our Audio Engine)
70+
6271
Copy the example config:
72+
6373
```bash
6474
cp Lavalink/example.application.yml Lavalink/application.yml
6575
```
@@ -79,17 +89,20 @@ java -jar lavalink.jar # Assuming you have the JAR ready
7989
By default, it runs at `localhost:2333`. Easy peasy!
8090

8191
### 5. Set Up the Database (Required!)
92+
>
8293
> [!CAUTION] 🚨 IMPORTANT 🚨
8394
**You MUST run this step before starting the bot, or it will crash!**
8495

85-
Choose your database type by setting `DATABASE_URL` in your `.env` file (see **[Configuration Guide](CONFIGURATION.md)**):
96+
Choose your database type by setting `DATABASE_URL` in your `.env` file (see **[Configuration Guide](configuration.md)**):
8697

8798
**For SQLite (recommended for beginners):**
99+
88100
```bash
89101
bun run db:push:sqlite
90102
```
91103

92104
**For PostgreSQL/PGLite (if DATABASE_URL is set to postgres://... or empty):**
105+
93106
```bash
94107
bun run db:push
95108
```
@@ -107,23 +120,29 @@ Existing data in SQLite will not be automatically transferred to Postgres.
107120
bun run db:push
108121
```
109122

110-
### 6. Launch the Bot!
123+
### 6. Launch the Bot
124+
111125
Build and run:
126+
112127
```bash
113128
bun run build
114129
bun run start
115130
```
116131

117132
### 7. Welcome Lavamusic to Your Server
133+
118134
Click here to invite: **[🎉 Add to Server 🎉](https://mintone.tech/invite)**
119135

120136
Or craft the link manually:
121137
> [!NOTE] Replace
138+
>
122139
> - `YOUR_CLIENT_ID` with your Bot Client ID
123140
> - `REDIRECT_URI` with your Bot Redirect URI
141+
>
124142
```
125143
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=279209954560&response_type=code&redirect_uri=REDIRECT_URI&integration_type=0&scope=bot+guilds+applications.commands
126144
```
127145

128146
### 8. Sync Commands (Optional Step)
129-
In any server channel, type `!deploy` or `/deploy` to activate slash commands.
147+
148+
In any server channel, type `!deploy` or `/deploy` to activate slash commands.

docs/public/logo.png

639 KB
Loading
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ locales/
8585
### Example
8686

8787
**Source (`en-US/commands.json`):**
88+
8889
```json
8990
{
9091
"ping": {
@@ -96,6 +97,7 @@ locales/
9697
```
9798

9899
**Target (`hi/commands.json`):**
100+
99101
```json
100102
{
101103
"ping": {

0 commit comments

Comments
 (0)