mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-18 17:48:00 +08:00
增加清理附件按钮,对悬空无引用的图片/附件进行清理 (#918)
* add attach_clean & change_theme * add attach_clean & change_theme * add * add readme --------- Co-authored-by: root <root@DESKTOP-L84EQPB.localdomain>
This commit is contained in:
56
README.md
56
README.md
@@ -268,3 +268,59 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
|
||||
|
||||
一个不纯粹的PHPer,一个不自由的 gopher 。
|
||||
|
||||
|
||||
# 部署补充
|
||||
- 若内网部署,draw.io无法使用外网,则需要用tomcat运行war包,见(https://github.com/jgraph/drawio) 从release下载,之后修改markdown.js的TODO行对应的链接即可
|
||||
- 为了护眼,简单增加了编辑界面的主题切换,见editormd.js和markdown_edit_template.tpl
|
||||
- (需重新编译项)为了对已删除文档/文档引用图片删除文字后,对悬空无引用的图片/附件进行清理,增加了清理接口,需重新编译
|
||||
- 编译后除二进制文件外还需更新三个文件: conf/lang/en-us.ini,zh-cn.ini; attach_list.tpl
|
||||
- 若不想重新编译,也可通过database/clean.py,手动执行对无引用图片/附件的文件清理和数据库记录双向清理。
|
||||
- 若采用nginx二级部署,以yourpath/为例,需修改
|
||||
- conf/app.conf修改:`baseurl="/yourpath"`
|
||||
- static/js/kancloud.js文件中`url: "/comment/xxxxx` => `url: "/yourpath" + "/comment/xxxxx`, 共两处
|
||||
|
||||
- nginx端口代理示例:
|
||||
```
|
||||
增加
|
||||
location /yourpath/ {
|
||||
rewrite ^/yourpath/(.*) /$1 break;
|
||||
proxy_pass http://127.0.0.1:8181;
|
||||
}
|
||||
```
|
||||
注意使用的是127.0.0.1,根据自身选择替换,如果nginx是docker部署,则还需要在docker中托管运行mindoc,具体参考如下配置:
|
||||
- docker-compose代理示例(docker-nginx代理运行mindoc)
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
mynginx:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- "8880:80"
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
service nginx start
|
||||
cd /src/mindoc/ && ./mindoc
|
||||
volumes:
|
||||
- ..:/src
|
||||
- ./nginx:/etc/nginx/conf.d
|
||||
```
|
||||
|
||||
目录结构
|
||||
```
|
||||
onefolder
|
||||
|
|
||||
- docker
|
||||
|
|
||||
- docker-compose.yml
|
||||
- nginx
|
||||
|
|
||||
- mynginx.conf
|
||||
|
||||
- mindoc
|
||||
|
|
||||
- database/
|
||||
- conf/
|
||||
- ...
|
||||
```
|
Reference in New Issue
Block a user