Skip to content

Commit 57eb36b

Browse files
authored
Merge pull request #19 from web-tech-tw/docs
Merge docs branch
2 parents 85d8273 + 4bc5a3e commit 57eb36b

29 files changed

+644
-20
lines changed

.github/workflows/docs.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docs workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy-docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Specific Node.js version 🦄
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
20+
- name: Checkout 🛎️
21+
uses: actions/checkout@v4
22+
23+
- name: Install and Build 📎
24+
run: |
25+
npm install
26+
npm run docs:build
27+
28+
- name: Deploy Docs 🚀
29+
uses: JamesIves/github-pages-deploy-action@v4
30+
with:
31+
branch: gh-pages
32+
folder: docs/.vitepress/dist

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ node_modules
44
/data
55
/static/file_*
66
config.yaml
7+
docs/.vitepress/dist
8+
docs/.vitepress/cache
79

810
# Log files
911
npm-debug.log*

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Arona
22

3-
The perfectest bridging for every messenger.
3+
A simple bridge for every messenger.
44

5-
[Bridge](https://matrix.org/bridges/) is the idea makes **[Matrix](https://matrix.org)** cross connecting every Instant Message Providers.
6-
7-
![Arona](icon.min.png)
5+
![Arona](docs/statics/icon.min.png)
86

97
## Documentation
108

app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const {
7979
app.listen(bindPort, bindHost, () => {
8080
console.info("Arona");
8181
console.info("===");
82-
console.info("The perfectest bridging for every messenger.");
82+
console.info("A simple bridge for every messenger.");
8383
console.info(`Listening on http://${bindHost}:${bindPort}`);
8484
checkHeartCode();
8585
});

docs/.vitepress/config.ts

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Arona",
6+
description: "A simple bridge for every messenger.",
7+
themeConfig: {
8+
// https://vitepress.dev/reference/default-theme-config
9+
nav: [{
10+
text: "Home",
11+
link: "/",
12+
}, {
13+
text: "Docs",
14+
link: "/introduction",
15+
}],
16+
sidebar: [
17+
{
18+
text: "🌟 Introduction",
19+
link: "/introduction",
20+
},
21+
{
22+
text: "😎 Prerequisites",
23+
link: "/prerequisites",
24+
},
25+
{
26+
text: "✨ Get Started",
27+
link: "/get-started",
28+
},
29+
{
30+
text: "🪄 Configuration",
31+
link: "/configuration",
32+
},
33+
{
34+
text: "🎯 Usage",
35+
link: "/usage",
36+
},
37+
{
38+
text: "🏁 Commands",
39+
link: "/commands",
40+
},
41+
{
42+
text: "❓ FAQ",
43+
link: "/faq",
44+
},
45+
{
46+
text: "🔱 Integrations",
47+
link: "/integrations",
48+
items: [
49+
{
50+
text: "LINE",
51+
link: "/integrations/line",
52+
},
53+
{
54+
text: "Matrix",
55+
link: "/integrations/matrix",
56+
},
57+
{
58+
text: "Discord",
59+
link: "/integrations/discord",
60+
},
61+
{
62+
text: "Telegram",
63+
link: "/integrations/telegram",
64+
},
65+
{
66+
text: "OpenAI",
67+
link: "/integrations/openai",
68+
}
69+
],
70+
},
71+
{
72+
text: "🔮 About",
73+
link: "/about",
74+
},
75+
],
76+
socialLinks: [
77+
{
78+
icon: 'github',
79+
link: 'https://github.com/web-tech-tw/arona',
80+
}
81+
],
82+
footer: {
83+
message: "MIT Licensed",
84+
copyright: "Copyright © 2024 Taiwan Web Technology Promotion Organization (Web Tech TW)"
85+
}
86+
},
87+
locales: {
88+
root: {
89+
label: 'English',
90+
lang: 'en'
91+
},
92+
"zh-tw": {
93+
label: '正體中文',
94+
lang: 'zh-tw',
95+
}
96+
}
97+
})

docs/README.md

-11
This file was deleted.

docs/about.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 🔮 About
2+
3+
Hello!
4+
5+
This is the bridge for LINE and Matrix,
6+
7+
to communicate with the chat room which belongs to both of the different providers.
8+
9+
![logo](statics/icon.min.png)
10+
11+
The bridge is using [line-bot-sdk-python](https://github.com/line/line-bot-sdk-python) and [matrix-nio](https://github.com/poljar/matrix-nio) for transporting.
12+
13+
[Instruction of Matrix Bridges](https://matrix.org/bridges/)
14+
15+
This is the documentation for Arona, the perfectest bridging for every messenger.

docs/commands.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 🏁 Commands
2+
3+
The following commands are available in the chat:
4+
5+
| Command | Description |
6+
| ---------------- | ------------------------- |
7+
| `/aiLink` | Link with AI chat |
8+
| `/aiUnlink` | Unlink with AI chat |
9+
| `/setLocaleCode` | Set locale |
10+
| `/datetime` | Get current date and time |
11+
| `/chatId` | Get chat ID |
12+
| `/pair` | Pair with another chat |
13+
| `/pairStatus` | Get pairing status |
14+
| `/pairLink` | Link with another chat |
15+
| `/pairUnlink` | Unlink with another chat |
16+
| `/help` | Show the help message |

docs/configuration.md

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# 🪄 Configuration
2+
3+
To configure the Arona, you need to create a configuration file named `config.yaml` in the root directory of the project.
4+
5+
## Configuration File
6+
7+
The configuration file is a YAML file that contains the configuration for the Arona.
8+
9+
```yaml
10+
deviceName: "Arona"
11+
12+
http:
13+
bindHost: 127.0.0.1
14+
bindPort: 3000
15+
baseUrl: "http://example.com"
16+
17+
bridge:
18+
public: true
19+
20+
bridgeProvider:
21+
# OpenAI
22+
openai:
23+
enable: true
24+
# https://github.com/ai-tech-tw/openai
25+
baseUrl: "https://web-tech-tw.eu.org/openai/v1"
26+
apiKey: "YourGeminiApiKey"
27+
chatModel: "gpt-3.5-turbo"
28+
29+
# LINE
30+
line:
31+
enable: true
32+
channelAccessToken: "YourChannelAccessToken"
33+
channelSecret: "YourChannelSecret"
34+
useNotify: true
35+
notifyClientId: "YourClientID"
36+
notifyClientSecret: "YourClientSecret"
37+
38+
# Matrix
39+
matrix:
40+
enable: true
41+
homeserverUrl: "https://matrix.org"
42+
accessToken: "YourSecretAccessToken"
43+
44+
# Discord
45+
discord:
46+
enable: false
47+
appId: "YourAppId"
48+
botToken: "YourBotToken"
49+
50+
# Telegram
51+
telegram:
52+
enable: false
53+
botToken: "YourBotToken"
54+
```
55+
56+
## Configuration Options
57+
58+
The configuration file contains the following options:
59+
60+
| Option | Description |
61+
| ---------------- | ---------------------------------- |
62+
| `deviceName` | The name of the device. |
63+
| `http` | The HTTP configuration. |
64+
| `bridge` | The bridge configuration. |
65+
| `bridgeProvider` | The bridge provider configuration. |
66+
67+
### `deviceName`
68+
69+
The `deviceName` option is used to specify the name of the device.
70+
71+
### `http`
72+
73+
The `http` option is used to configure the HTTP server.
74+
75+
| Option | Description |
76+
| ---------- | ------------------------ |
77+
| `bindHost` | The host to bind to. |
78+
| `bindPort` | The port to bind to. |
79+
| `baseUrl` | The base URL of the API. |
80+
81+
### `bridge`
82+
83+
The `bridge` option is used to configure the bridge.
84+
85+
| Option | Description |
86+
| -------- | ------------------------------------ |
87+
| `public` | Whether the bridge is public or not. |
88+
89+
### `bridgeProvider`
90+
91+
The `bridgeProvider` option is used to configure the bridge provider.
92+
93+
#### OpenAI
94+
95+
The `openai` option is used to configure the OpenAI provider.
96+
97+
| Option | Description |
98+
| ----------- | --------------------------------------- |
99+
| `enable` | Whether the provider is enabled or not. |
100+
| `baseUrl` | The base URL of the OpenAI API. |
101+
| `apiKey` | The API key of the OpenAI API. |
102+
| `chatModel` | The chat model to use. |
103+
104+
Details of OpenAI integration can be found [here](integrations/openai.md).
105+
106+
#### LINE
107+
108+
The `line` option is used to configure the LINE provider.
109+
110+
| Option | Description |
111+
| -------------------- | ----------------------------------------- |
112+
| `enable` | Whether the provider is enabled or not. |
113+
| `channelAccessToken` | The channel access token of the LINE API. |
114+
| `channelSecret` | The channel secret of the LINE API. |
115+
| `useNotify` | Whether to use LINE Notify or not. |
116+
| `notifyClientId` | The client ID of the LINE Notify API. |
117+
| `notifyClientSecret` | The client secret of the LINE Notify API. |
118+
119+
Details of LINE integration can be found [here](integrations/line.md).
120+
121+
#### Matrix
122+
123+
The `matrix` option is used to configure the Matrix provider.
124+
125+
| Option | Description |
126+
| --------------- | --------------------------------------- |
127+
| `enable` | Whether the provider is enabled or not. |
128+
| `homeserverUrl` | The homeserver URL of the Matrix API |
129+
| `accessToken` | The access token of the Matrix API. |
130+
131+
Details of Matrix integration can be found [here](integrations/matrix.md).
132+
133+
#### Discord
134+
135+
The `discord` option is used to configure the Discord provider.
136+
137+
| Option | Description |
138+
| ---------- | --------------------------------------- |
139+
| `enable` | Whether the provider is enabled or not. |
140+
| `appId` | The application ID of the Discord API. |
141+
| `botToken` | The bot token of the Discord API. |
142+
143+
Details of Discord integration can be found [here](integrations/discord.md).
144+
145+
#### Telegram
146+
147+
The `telegram` option is used to configure the Telegram provider.
148+
149+
| Option | Description |
150+
| ---------- | --------------------------------------- |
151+
| `enable` | Whether the provider is enabled or not. |
152+
| `botToken` | The bot token of the Telegram API. |
153+
154+
Details of Telegram integration can be found [here](integrations/telegram.md).

docs/faq.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ❓ FAQ
2+
3+
## What is Arona?
4+
5+
Arona is a bridge for LINE and Matrix, to communicate with the chat room which belongs to both of the different providers.

0 commit comments

Comments
 (0)