Skip to content

Commit 37c48bc

Browse files
author
piexlMax(奇淼
committed
docs: 更新文档配置和添加robots.txt
添加mcp配置文档中的addr和separate选项 新增robots.txt文件防止第三方logo被收录 在系统配置文档中添加auto-migrate选项
1 parent 9187b3d commit 37c48bc

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

docs/guide/server/config.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ system:
217217
use-redis: false
218218
use-mongo: false
219219
use-strict-auth: false
220+
auto-migrate: true
220221
```
221222
222223
### struct
@@ -234,6 +235,7 @@ type System struct {
234235
UseRedis bool `mapstructure:"use-redis" json:"use-redis" yaml:"use-redis"` // 使用redis
235236
UseMongo bool `mapstructure:"use-mongo" json:"use-mongo" yaml:"use-mongo"` // 使用mongo
236237
UseStrictAuth bool `mapstructure:"use-strict-auth" json:"use-strict-auth" yaml:"use-strict-auth"` // 使用树形角色分配模式
238+
AutoMigrate bool `mapstructure:"auto-migrate" json:"auto-migrate" yaml:"auto-migrate"` // 是否自动迁移数据库
237239
}
238240
```
239241

@@ -252,7 +254,7 @@ type System struct {
252254
| iplimit-time | int | IP限流:限制时间窗口(秒),默认3600 |
253255
| use-mongo | bool | 是否使用MongoDB数据库,默认false |
254256
| use-strict-auth | bool | 是否开启严格角色模式(树形角色分配),默认false |
255-
257+
| auto-migrate | bool | 是否自动迁移数据库,默认true,建议在开发环境开启,生产环境建议关闭 (本配置在>=v2.8.6后可用) |
256258
## captcha
257259

258260
### yaml

docs/guide/server/mcp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ mcp:
8686
sse_path: /sse # SSE路径
8787
message_path: /message # 消息路径
8888
url_prefix: '' # URL前缀
89+
## v2.8.6后可用
90+
addr: 8889 # 监听地址 在separate为true时有效 (暂时未实现独立运行功能,敬请期待)
91+
separate: false # 是否隔离 开启以后mcp将不会跟随gva本体启动 建议在生产环境开启
8992
```
9093
9194
## 自动填写页面参数示例

docs/public/robots.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Robots.txt for Gin-Vue-Admin Documentation Site
2+
# 防止第三方企业logo被搜索引擎误收录为网站logo
3+
4+
User-agent: *
5+
Allow: /
6+
7+
# 禁止收录第三方企业logo目录
8+
Disallow: /user/
9+
Disallow: /user/ali.jpg
10+
Disallow: /user/zijie.jpg
11+
Disallow: /user/tengxun.png
12+
Disallow: /user/ea.jpg
13+
Disallow: /user/douyu.jpg
14+
Disallow: /user/vivo.svg
15+
Disallow: /user/anker.png
16+
Disallow: /user/shenxinfu.png
17+
Disallow: /user/cadence.jpeg
18+
Disallow: /user/transsion.svg
19+
Disallow: /user/mobile.png
20+
Disallow: /user/huashu.png
21+
22+
# 允许收录网站自有资源
23+
Allow: /logo.png
24+
Allow: /logo.svg
25+
Allow: /favicon.ico
26+
Allow: /favicon.svg
27+
28+
# 网站地图
29+
Sitemap: https://www.gin-vue-admin.com/sitemap.xml

0 commit comments

Comments
 (0)