Skip to content

Commit 0a8954c

Browse files
committed
feat:<printerMate> conflict fix
1 parent 577d3de commit 0a8954c

18 files changed

+227
-31
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.umi
3+
.umi-production

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"proseWrap": "never",
6+
"overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }],
7+
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-packagejson"]
8+
}

docs/603.async.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# vim
2+
3+
## 问题
4+
5+
1. 复制后会退出编辑模式
6+
2. H左←,J上↑,K下↓,L右→,怎么定义一行的?
7+
3. 查看模式下,鼠标切换不到行尾最后一个元素处,复制时会复制到最后一个元素前面
8+
4. 有时候莫名其妙进入选中状态,移动贯标时会选中内容

docs/docs/develop/linux/nginx.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Nginx
2+
3+
### 1. 安装 Nginx
4+
5+
首先,确保您的服务器上已经安装了 Nginx。如果没有安装,可以使用以下命令进行安装:
6+
7+
对于 CentOS 系统:
8+
9+
```sh
10+
sudo yum install epel-release
11+
sudo yum install nginx
12+
```
13+
14+
对于 Ubuntu/Debian 系统:
15+
16+
```sh
17+
sudo apt update
18+
sudo apt install nginx
19+
```
20+
21+
### 2. 启动和启用 Nginx
22+
23+
安装完成后,启动 Nginx 并设置开机自启:
24+
25+
```sh
26+
sudo systemctl start nginx
27+
sudo systemctl enable nginx
28+
```
29+
30+
### 3. 放置前端项目的文件
31+
32+
将您的前端项目文件放置到一个合适的目录中。通常,Nginx 的默认网站根目录是 /var/www/html,但您可以选择其他目录。
33+
34+
例如,假设您的前端项目位于 /var/www/myfrontend 目录下:
35+
36+
```sh
37+
sudo mkdir -p /var/www/myfrontend
38+
sudo cp -r /path/to/your/frontend/build/* /var/www/myfrontend/
39+
```
40+
41+
### 4. 配置 Nginx
42+
43+
**查看默认nginx配置**
44+
45+
```sh
46+
sudo find / -name nginx.conf
47+
// /www/server/nginx/conf/nginx.conf
48+
// 默认的配置文件位于 `/etc/nginx/nginx.conf`
49+
```
50+
51+
**查看已配置的站点**
52+
53+
```
54+
// 在nginx.config中查看是否包含以下指令,该指令表示你配置的站点文件,每个文件是一个站点配置
55+
include /etc/nginx/conf.d/*.conf;
56+
include /etc/nginx/sites-enabled/*;
57+
```
58+
59+
**创建新的站点配置文件**
60+
61+
```sh
62+
sudo nano /etc/nginx/sites-available/myfrontend
63+
```
64+
65+
在打开的文件中添加以下内容:
66+
67+
```nginx
68+
server {
69+
listen 80;
70+
server_name your_domain_or_ip;
71+
72+
root /var/www/myfrontend;
73+
index index.html;
74+
75+
location / {
76+
try_files $uri $uri/ /index.html;
77+
}
78+
79+
# 可选:日志配置
80+
access_log /var/log/nginx/myfrontend.access.log;
81+
error_log /var/log/nginx/myfrontend.error.log;
82+
}
83+
```
84+
85+
- `listen 80;` 表示监听 80 端口。
86+
- `server_name your_domain_or_ip;` 替换为您的域名或服务器 IP 地址。
87+
- `root /var/www/myfrontend;` 指定前端项目的根目录。
88+
- `try_files $uri $uri/ /index.html;` 用于处理单页应用(SPA)的路由问题。
89+
90+
启用配置?
91+
创建符号链接以启用新配置:
92+
93+
```sh
94+
sudo ln -s /etc/nginx/sites-available/myfrontend /etc/nginx/sites-enabled/
95+
```
96+
97+
### 5. 测试配置
98+
99+
在重新加载 Nginx 之前,先测试配置文件是否正确:
100+
101+
```sh
102+
sudo nginx -t
103+
```
104+
105+
如果测试通过,重新加载 Nginx 以应用更改:
106+
107+
```sh
108+
sudo systemctl reload nginx
109+
```
110+
111+
### 6. 访问您的前端项目
112+
113+
现在,您应该能够通过浏览器访问您的前端项目。只需在浏览器地址栏中输入您的域名或服务器 IP 地址即可:
114+
115+
http://your_domain_or_ip
116+
117+
### 7. 其他注意事项
118+
119+
SSL/TLS 配置:如果您需要使用 HTTPS,可以配置 SSL 证书。建议使用 Let's Encrypt 提供的免费证书。
120+
防火墙配置:确保防火墙允许 HTTP (端口 80) 和 HTTPS (端口 443) 请求。

docs/docsStructure.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,34 @@ module.exports = [
2727
"label": "develop",
2828
"type": "directory",
2929
"children": [
30+
{
31+
"key": "docs/develop/aliCloud",
32+
"label": "aliCloud",
33+
"type": "directory",
34+
"children": []
35+
},
36+
{
37+
"key": "docs/develop/engineeringEfficiency",
38+
"label": "engineeringEfficiency",
39+
"type": "directory",
40+
"children": [
41+
{
42+
"key": "docs/develop/engineeringEfficiency/vim.md",
43+
"label": "vim",
44+
"type": "file"
45+
}
46+
]
47+
},
3048
{
3149
"key": "docs/develop/linux",
3250
"label": "linux",
3351
"type": "directory",
3452
"children": [
53+
{
54+
"key": "docs/develop/linux/nginx.md",
55+
"label": "Nginx",
56+
"type": "file"
57+
},
3558
{
3659
"key": "docs/develop/linux/tree.md",
3760
"label": "显示目录结构",

docs/layouts__index.async.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/layouts__menuLayout.async.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)