Skip to content

Commit c14abb8

Browse files
committed
docs(wip): added zh_CN docs
1 parent 2c675be commit c14abb8

File tree

16 files changed

+673
-42
lines changed

16 files changed

+673
-42
lines changed

frontend/docs/.vitepress/cache/deps/_metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"hash": "175b884a",
3-
"browserHash": "66b03797",
2+
"hash": "8f978f95",
3+
"browserHash": "7414e922",
44
"optimized": {
55
"vue": {
66
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
77
"file": "vue.js",
8-
"fileHash": "6bc8ca95",
8+
"fileHash": "6db30e9f",
99
"needsInterop": false
1010
},
1111
"@theme/index": {
1212
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
1313
"file": "@theme_index.js",
14-
"fileHash": "9b5d66a8",
14+
"fileHash": "e28de872",
1515
"needsInterop": false
1616
}
1717
},

frontend/docs/.vitepress/config.ts

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ export default defineConfig({
1010
lang: 'en-US',
1111
title: 'Nginx UI',
1212
description: 'Yet another Nginx Web UI',
13+
14+
lastUpdated: true,
15+
16+
locales: {
17+
root: {
18+
label: 'English',
19+
lang: 'en'
20+
},
21+
zh_CN: {
22+
label: '简体中文',
23+
lang: 'zh_CN'
24+
}
25+
},
26+
1327
themeConfig: {
1428
// https://vitepress.dev/reference/default-theme-config
1529
nav: [
@@ -18,27 +32,10 @@ export default defineConfig({
1832
{text: 'Demo', link: 'https://nginxui.jackyu.cn'}
1933
],
2034

21-
sidebar: {
22-
'/guide/': [
23-
{
24-
text: 'Introduction',
25-
items: [
26-
{text: 'What is Nginx UI?', link: '/guide/about'},
27-
{text: 'Getting Started', link: '/guide/getting-started'},
28-
{text: 'Nginx Proxy Example', link: '/guide/nginx-proxy-example'},
29-
{text: 'Contributing', link: '/guide/contributing'},
30-
{text: 'License', link: '/guide/license'}
31-
]
32-
},
33-
{
34-
text: 'Configuration',
35-
items: [
36-
{text: 'Server', link: '/guide/config-server'},
37-
{text: 'Nginx Log', link: '/guide/config-nginx-log'},
38-
{text: 'Open AI', link: '/guide/config-openai'}
39-
]
40-
}
41-
]
35+
sidebar: sidebar(),
36+
37+
editLink: {
38+
pattern: 'https://github.com/0xJacky/nginx-ui/edit/master/frontend/docs/:path'
4239
},
4340

4441
search: {
@@ -55,3 +52,52 @@ export default defineConfig({
5552
]
5653
}
5754
})
55+
56+
function sidebar() {
57+
return {
58+
'/guide/': [
59+
{
60+
text: 'Introduction',
61+
collapsed: false,
62+
items: [
63+
{text: 'What is Nginx UI?', link: '/guide/about'},
64+
{text: 'Getting Started', link: '/guide/getting-started'},
65+
{text: 'Nginx Proxy Example', link: '/guide/nginx-proxy-example'},
66+
{text: 'Contributing', link: '/guide/contributing'},
67+
{text: 'License', link: '/guide/license'}
68+
]
69+
},
70+
{
71+
text: 'Configuration',
72+
collapsed: false,
73+
items: [
74+
{text: 'Server', link: '/guide/config-server'},
75+
{text: 'Nginx Log', link: '/guide/config-nginx-log'},
76+
{text: 'Open AI', link: '/guide/config-openai'}
77+
]
78+
}
79+
],
80+
'/zh_CN/guide/': [
81+
{
82+
text: '介绍',
83+
collapsed: false,
84+
items: [
85+
{text: '何为 Nginx UI?', link: '/zh_CN/guide/about'},
86+
{text: '即刻开始', link: '/zh_CN/guide/getting-started'},
87+
{text: 'Nginx 代理示例', link: '/zh_CN/guide/nginx-proxy-example'},
88+
{text: '贡献代码', link: '/zh_CN/guide/contributing'},
89+
{text: '开源协议', link: '/zh_CN/guide/license'}
90+
]
91+
},
92+
{
93+
text: '配置',
94+
collapsed: false,
95+
items: [
96+
{text: '服务端', link: '/zh_CN/guide/config-server'},
97+
{text: 'Nginx 日志', link: '/zh_CN/guide/config-nginx-log'},
98+
{text: 'Open AI', link: '/zh_CN/guide/config-openai'}
99+
]
100+
}
101+
]
102+
}
103+
}

frontend/docs/guide/about.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
<script setup>
2+
import { VPTeamMembers } from 'vitepress/theme'
3+
4+
const members = [
5+
{
6+
avatar: 'https://www.github.com/0xJacky.png',
7+
name: '0xJacky',
8+
title: 'Creator',
9+
links: [
10+
{ icon: 'github', link: 'https://github.com/0xJacky' },
11+
]
12+
},
13+
{
14+
avatar: 'https://www.github.com/Hintay.png',
15+
name: 'Hintay',
16+
title: 'Developer',
17+
links: [
18+
{ icon: 'github', link: 'https://github.com/Hintay' },
19+
]
20+
},
21+
]
22+
</script>
23+
124
# What is Nginx UI?
225

326
![Dashboard](/dashboard_en.png)
@@ -9,6 +32,10 @@ features such as online access to Nginx logs, automatic testing and reloading of
932
dark mode, and responsive web design. Built with Go and Vue, Nginx UI ensures a seamless and efficient experience for
1033
managing your Nginx server.
1134

35+
## Our Team
36+
37+
<VPTeamMembers size="small" :members="members" />
38+
1239
## Demo
1340

1441
URL:[https://nginxui.jackyu.cn](https://nginxui.jackyu.cn)

frontend/docs/guide/config-nginx-log.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ Nginx logs are essential for monitoring, troubleshooting, and maintaining your w
44
insights into server performance, user behavior, and potential issues. In this section, we will discuss the two primary
55
types of logs: access logs and error logs.
66

7+
For Nginx-UI Docker users who are upgrading from v1.5.2 or earlier versions, it is crucial to add separate `access_log`
8+
and `error_log` directives in your `nginx.conf` before configuring the `app.ini`.
9+
10+
In the Nginx-UI container, `/var/log/nginx/access.log` is a symlink pointing to `/dev/stdout`,
11+
and `/var/log/nginx/error.log`
12+
is a symlink pointing to `/dev/stderr`. This setup allows you to view both the Nginx and Nginx-UI logs using the `docker
13+
logs nginx-ui` command. However, these two devices do not support the tail command, so it is necessary to use additional
14+
log files to record Nginx logs.
15+
16+
Example:
17+
18+
```nginx
19+
error_log /var/log/nginx/error.log notice;
20+
error_log /var/log/nginx/error.local.log notice;
21+
22+
http {
23+
...
24+
access_log /var/log/nginx/access.log main;
25+
access_log /var/log/nginx/access.local.log main;
26+
...
27+
}
28+
```
29+
30+
Additionally, set nginx access log and error log path in `app.ini` and restart nginx-ui.
31+
32+
Example:
33+
34+
```ini
35+
[nginx_log]
36+
AccessLogPath = /var/log/nginx/access.local.log
37+
ErrorLogPath = /var/log/nginx/error.local.log
38+
```
39+
740
## AccessLogPath
841

942
- Type: `string`
@@ -15,4 +48,3 @@ This option is used to set the path of nginx access log for Nginx UI, so we can
1548
- Type: `string`
1649

1750
This option is used to set the path of nginx error log for Nginx UI, so we can view the log content online.
18-

frontend/docs/guide/config-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ terminal, please set it to `bash` or `zsh` (if installed).
5656
- Default: 10
5757

5858
This option is used to set the page size of list pagination in the Nginx UI. Adjusting the page size can help in
59-
managing large amounts of data more effectively.
59+
managing large amounts of data more effectively, but a too large number can increase the load on the server.
6060

6161
## CADir
6262

frontend/docs/zh_CN/guide/about.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<script setup>
2+
import { VPTeamMembers } from 'vitepress/theme'
3+
4+
const members = [
5+
{
6+
avatar: 'https://www.github.com/0xJacky.png',
7+
name: '0xJacky',
8+
title: '创始人',
9+
links: [
10+
{ icon: 'github', link: 'https://github.com/0xJacky' },
11+
]
12+
},
13+
{
14+
avatar: 'https://www.github.com/Hintay.png',
15+
name: 'Hintay',
16+
title: '开发者',
17+
links: [
18+
{ icon: 'github', link: 'https://github.com/Hintay' },
19+
]
20+
},
21+
]
22+
</script>
23+
24+
# 何为 Nginx UI?
25+
26+
![Dashboard](/dashboard_zh_CN.png)
27+
28+
Nginx UI 是一个全新的 Nginx 网络管理界面,旨在简化 Nginx 服务器的管理和配置。它提供实时服务器统计数据、ChatGPT
29+
助手、一键部署、Let's Encrypt 证书的自动续签以及用户友好的网站配置编辑工具。此外,Nginx UI 还提供了在线访问 Nginx
30+
日志、配置文件的自动测试和重载、网络终端、深色模式和自适应网页设计等功能。Nginx UI 采用 Go 和 Vue 构建,确保在管理 Nginx
31+
服务器时提供无缝高效的体验。
32+
33+
## 我们的团队
34+
35+
<VPTeamMembers size="small" :members="members" />
36+
37+
## 在线预览
38+
39+
网址:[https://nginxui.jackyu.cn](https://nginxui.jackyu.cn)
40+
41+
- 用户名:admin
42+
- 密码:admin
43+
44+
## 特色
45+
46+
- 在线查看服务器 CPU、内存、系统负载、磁盘使用率等指标
47+
- 在线 ChatGPT 助理
48+
- 一键申请和自动续签 Let's encrypt 证书
49+
- 在线编辑 Nginx 配置文件,编辑器支持 Nginx 配置语法高亮
50+
- 在线查看 Nginx 日志
51+
- 使用 Go 和 Vue 开发,发行版本为单个可执行的二进制文件
52+
- 保存配置后自动测试配置文件并重载 Nginx
53+
- 基于网页浏览器的高级命令行终端
54+
- 支持深色模式
55+
- 自适应网页设计
56+
57+
## 国际化
58+
59+
- 英语
60+
- 简体中文
61+
- 繁体中文
62+
63+
我们欢迎您将项目翻译成任何语言。
64+
65+
## 构建基于
66+
67+
- [The Go Programming Language](https://go.dev)
68+
- [Gin Web Framework](https://gin-gonic.com)
69+
- [GORM](http://gorm.io)
70+
- [Vue 3](https://v3.vuejs.org)
71+
- [Vite](https://vitejs.dev)
72+
- [TypeScript](https://www.typescriptlang.org/)
73+
- [Ant Design Vue](https://antdv.com)
74+
- [vue3-gettext](https://github.com/jshmrtn/vue3-gettext)
75+
- [vue3-ace-editor](https://github.com/CarterLi/vue3-ace-editor)
76+
- [Gonginx](https://github.com/tufanbarisyildirim/gonginx)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Nginx 日志
2+
3+
Nginx 日志对于监控、排查问题和维护您的 Web 服务器至关重要。它们提供了有关服务器性能、用户行为和潜在问题的宝贵见解。在本节中,我们将讨论两种主要类型的日志:访问日志和错误日志。
4+
5+
对于从 v1.5.2 或更早版本升级的 Nginx-UI Docker 用户,在配置 `app.ini` 之前,至关重要的是在您的 `nginx.conf`
6+
中添加单独的 `access_log``error_log` 指令。
7+
8+
在 Nginx-UI 容器中,`/var/log/nginx/access.log` 是一个指向 `/dev/stdout` 的符号链接,而 `/var/log/nginx/error.log`
9+
是一个指向 `/dev/stderr` 的符号链接。这种设置允许您使用 `docker logs nginx-ui` 命令查看 Nginx 和 Nginx-UI 日志。然而,这两个设备不支持
10+
tail 命令,因此有必要使用额外的日志文件来记录 Nginx 日志。
11+
12+
示例:
13+
14+
```nginx
15+
error_log /var/log/nginx/error.log notice;
16+
error_log /var/log/nginx/error.local.log notice;
17+
18+
http {
19+
...
20+
access_log /var/log/nginx/access.log main;
21+
access_log /var/log/nginx/access.local.log main;
22+
...
23+
}
24+
```
25+
26+
此外,在 `app.ini` 中设置 nginx 访问日志和错误日志路径,然后重新启动 nginx-ui。
27+
28+
示例:
29+
30+
```ini
31+
[nginx_log]
32+
AccessLogPath = /var/log/nginx/access.local.log
33+
ErrorLogPath = /var/log/nginx/error.local.log
34+
```
35+
36+
## AccessLogPath
37+
38+
- 类型:`string`
39+
40+
此选项用于为 Nginx UI 设置 Nginx 访问日志的路径,以便我们在线查看日志内容。
41+
42+
## ErrorLogPath
43+
44+
- 类型:`string`
45+
46+
此选项用于为 Nginx UI 设置 Nginx 错误日志的路径,以便我们在线查看日志内容。
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Open AI
2+
3+
本节用于设置 ChatGPT 配置。请注意,我们不会检查您提供的信息的准确性。如果配置错误,可能会导致 API 请求失败,导致 ChatGPT
4+
助手无法使用。
5+
6+
## BaseUrl
7+
8+
- 类型:`string`
9+
10+
此选项用于设置 Open AI API 的基本 URL,如果不需要更改 URL,则将其保留为空。
11+
12+
## Token
13+
14+
- 类型:`string`
15+
16+
此选项用于设置 Open AI API 的令牌。
17+
18+
## Proxy
19+
20+
- 类型:`string`
21+
22+
此选项用于为 OpenAI 的 API 配置代理。如果您在国家或地区无法访问 OpenAI 的 API,可以使用 HTTP 代理并将此选项设置为相应的
23+
URL。
24+
25+
## Model
26+
27+
- 类型:`string`
28+
- 默认值:`gpt-3.5-turbo`
29+
30+
此选项用于设置 ChatGPT 模型。如果您的帐户有权限访问 `gpt-4` 模型,可以相应地配置此选项。

0 commit comments

Comments
 (0)