Skip to content

Commit aff3be7

Browse files
committed
feat: add q&a
1 parent 7ed2677 commit aff3be7

File tree

4 files changed

+54
-29
lines changed

4 files changed

+54
-29
lines changed

.vitepress/config.mjs

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,23 @@ export default defineConfig({
2121
{ icon: "github", link: "https://github.com/LagrangeDev/LagrangeV2/tree/main/Lagrange.Milky" },
2222
],
2323
sidebar: {
24-
"/getting-started/": [
25-
{
26-
text: "快速开始",
27-
items: [
28-
{
29-
text: "下载",
30-
link: "/getting-started/download",
31-
},
32-
{
33-
text: "运行",
34-
link: "/getting-started/run",
35-
},
36-
],
37-
},
38-
{
39-
text: "配置",
40-
link: "/configuration/overview",
41-
},
42-
],
24+
"/getting-started/": [{
25+
text: "快速开始",
26+
items: [
27+
{
28+
text: "下载",
29+
link: "/getting-started/download",
30+
},
31+
{
32+
text: "运行",
33+
link: "/getting-started/run",
34+
},
35+
{
36+
text: "Q&A",
37+
link: "/getting-started/qa",
38+
},
39+
],
40+
}],
4341
"/configuration": [{
4442
text: "配置",
4543
items: [
@@ -60,10 +58,7 @@ export default defineConfig({
6058
link: "/configuration/milky",
6159
},
6260
],
63-
}],
64-
"/reference/": [{
65-
text: "配置",
66-
}],
61+
}]
6762
},
6863
outline: {
6964
level: [2, 4],

src/getting-started/qa.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Q&A
2+
3+
## 无法监听 `0.0.0.0`
4+
5+
Lagrange.Milky 使用 C# 的 HttpListener 进行监听\
6+
而 HttpListener 使用 "*" 表示监听所有接口\
7+
更多信息参考 [Milky.Host](../configuration/milky#milkyhost)
8+
9+
## 非 Windows 平台使用 `localhost` 无法访问监听 `127.0.0.1` 的服务
10+
11+
Lagrange.Milky 使用 C# 的 HttpListener 进行监听\
12+
受限于 HttpListener 的实现, 非 Windows 平台监听的主机地址必须和请求的 Host 请求头一致\
13+
如这里需要把 Milky.Host 设置为 `localhost`\
14+
更多信息参考 [Milky.Host](../configuration/milky#milkyhost)

src/getting-started/run.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
::: danger 注意
44
遇到问题时
55

6-
1. 查看 Github 仓库中的 README.md 以确保没有配置错误
7-
2. 查看 Github 仓库中的 Issue 查看此问题是否因为某种原因未能修复
8-
3. 将配置文件中的 `Logging.LogLevel.Default` 改为 `Trace` 并重启
9-
4. 复现问题
10-
5. 将 <span style="background: linear-gradient(to bottom right, skyblue, pink); color: black; font-weight: 900">Lagrange.Milky Lagrange.Milky Lagrange.Milky</span> 的日志 <span style="background: linear-gradient(to bottom right, skyblue, pink); color: black; font-weight: 900">全部 全部 全部 全部 全部 全部 全部 全部 全部</span> 复制并发送到 Issue 或群里寻求帮助
6+
1. 查看 [Q&A](./qa) 是否有说明
7+
2. 查看 Github 仓库中的 README.md 以确保没有配置错误
8+
3. 查看 Github 仓库中的 Issue 查看此问题是否因为某种原因未能修复
9+
4. 将配置文件中的 `Logging.LogLevel.Default` 改为 `Trace` 并重启
10+
5. 复现问题
11+
6. 将 <span style="background: linear-gradient(to bottom right, skyblue, pink); color: black; font-weight: 900">Lagrange.Milky Lagrange.Milky Lagrange.Milky</span> 的日志 <span style="background: linear-gradient(to bottom right, skyblue, pink); color: black; font-weight: 900">全部 全部 全部 全部 全部 全部 全部 全部 全部</span> 复制并发送到 Issue 或群里寻求帮助
12+
1113
:::
1214

15+
在终端输入以下命令启动
16+
1317
::: code-group
1418

15-
```bash [Windows]
19+
```bat [Windows]
1620
.\Lagrange.Milky.exe
1721
```
1822

@@ -22,3 +26,13 @@ chmod +x ./Lagrange.Milky
2226
# 运行
2327
./Lagrange.Milky
2428
```
29+
30+
::: info 信息
31+
第一次启动时将会提示 `Please edit the configuration file and press any key to continue starting the application.`\
32+
此时可以根据 [Configuration](../configuration/overview.md) 修改生成的默认配置文件\
33+
然后按任意键继续启动
34+
:::
35+
36+
根据登录方式扫码或进行验证操作, 后续登录将会使用 Keystore 进行快速登录, 无需进行操作
37+
38+
当提示 `Application started. Press Ctrl+C to shut down.` 时启动完成

src/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ hero:
88
actions:
99
- text: 快速开始
1010
link: /getting-started/download
11+
- text: 配置
12+
link: /configuration/overview
1113
- theme: "alt"
1214
text: Github
1315
link: https://github.com/LagrangeDev/LagrangeV2/tree/main/Lagrange.Milky

0 commit comments

Comments
 (0)