Pārlūkot izejas kodu

Merge branch 'master' into new-beego-path

roberChen 4 gadi atpakaļ
vecāks
revīzija
126952a4ca
2 mainītis faili ar 61 papildinājumiem un 47 dzēšanām
  1. 27 13
      .travis.yml
  2. 34 34
      README.md

+ 27 - 13
.travis.yml

@@ -1,32 +1,46 @@
-language: go
+os: linux
+dist: focal
 
+language: go
 go:
   - "1.12"
 
-sudo: true
+arch:
+- amd64
+
+env:
+- GO111MODULE=on CGO_ENABLED=1
+
 install:
-  - dep ensure
+  - go mod tidy -v
 
 before_install:
-  - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+  - whereis gcc
+  - go env
 
 script:
-  - dep ensure && GO_ENABLED=1 go build -v -x -tags "pam" && go install
+  - go build -o mindoc_linux_amd64 -ldflags "-w"
+  - cp conf/app.conf.example conf/app.conf
+  - ./mindoc_linux_amd64 version
+  - rm conf/app.conf
 
 before_deploy:
-  - dep ensure -v && CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o mindoc_linux_amd64 -ldflags="-w -X github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/mindoc-org/mindoc/go version`'"
-  - rm -rf simsun.ttc start.sh commands controllers models modules data routers tasks vendor docs search utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile Gopkg.toml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md
+  - go mod tidy -v && GOARCH=amd64 GOOS=linux go build -o mindoc_linux_amd64 -ldflags="-w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`go version`'"
+  # remove files
+  - rm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh
+  # remove dirs
+  - rm -rf cache commands controllers converter .git .github graphics mail models routers utils
+  - ls -alh
   - cp conf/app.conf.example conf/app.conf
-  - zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64
+  - zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64 favicon.ico LICENSE.md
 
 deploy:
   provider: releases
-  api_key: $CI_USER_TOKEN
-  skip_cleanup: true
+  token: $CI_USER_TOKEN
+  cleanup: true
+  overwrite: true
   file:
     - mindoc_linux_amd64.zip
   on:
-    overwrite: true
     tags: true
-    all_branches: true
-    go: "1.12"
+    branch: master

+ 34 - 34
README.md

@@ -1,29 +1,25 @@
 # MinDoc 简介
 
-[![Build Status](https://travis-ci.org/lifei6671/mindoc.svg?branch=master)](https://travis-ci.org/lifei6671/mindoc)
-[![Build status](https://ci.appveyor.com/api/projects/status/ik70whjrioyvfy18/branch/master?svg=true)](https://ci.appveyor.com/project/lifei6671/godoc/branch/master)
+[![Build Status](https://travis-ci.com/mindoc-org/mindoc.svg?branch=master)](https://travis-ci.com/mindoc-org/mindoc)
+[![Build status](https://ci.appveyor.com/api/projects/status/o3lcfmf5iy2cp9m6?svg=true)](https://ci.appveyor.com/project/gsw945/mindoc)
 
 MinDoc 是一款针对IT团队开发的简单好用的文档管理系统。
 
-MinDoc 的前身是 SmartWiki 文档系统。SmartWiki 是基于 PHP 框架 laravel 开发的一款文档管理系统。因 PHP 的部署对普通用户来说太复杂,所以改用 Golang 开发。可以方便用户部署和实用。
+MinDoc 的前身是 [SmartWiki](https://github.com/lifei6671/SmartWiki) 文档系统。SmartWiki 是基于 PHP 框架 laravel 开发的一款文档管理系统。因 PHP 的部署对普通用户来说太复杂,所以改用 Golang 开发。可以方便用户部署和实用。
 
 开发缘起是公司IT部门需要一款简单实用的项目接口文档管理和分享的系统。其功能和界面源于 kancloud 。
 
 可以用来储存日常接口文档,数据库字典,手册说明等文档。内置项目管理,用户管理,权限管理等功能,能够满足大部分中小团队的文档管理需求。
 
-演示站点: [http://doc.iminho.me](http://doc.iminho.me)
+演示站点: [https://www.iminho.me/wiki/](https://www.iminho.me/wiki/)
 
 ---
 
-<details>
-<summary>开发维护召集令</summary>
+### 开发&维护&使用 悉知
 
 感谢作者 [lifei6671](https://github.com/lifei6671) 创造了MinDoc,并持续维护了很久。
 
-本人向公司推广了MinDoc,反向很好。受益于开源,便想回馈于开源。但看到MinDoc似乎停更了一年,尝试和作者沟通后,得知作者因工作等原因,精力有限,无法持续维护,请求得到了GitHub仓库的部分维护权限。
-本人技术能力有限,且业余时间并不充裕,处理 Issues 和 Pull Requests 的进度缓慢,希望能和热心开发者一起持续维护MinDoc。
-维护权限需要作者添加,有意向者请添加下方QQ群,或通过发送邮件(`gsw945#foxmail.com`, 请替换`#`为`@`),私聊我加入作者所在的微信群。
-</details>
+作者因工作等原因,精力有限,无法花费足够的时间来持续维护mindoc,已于北京时间2021年3月23日将mindoc交给社区(github组织[mindoc-org](https://github.com/mindoc-org))维护,期待热心开发者加入[mindoc-org](https://github.com/mindoc-org)一起来维护MinDoc。
 
 遇到问题请提 [Issues](https://github.com/mindoc-org/mindoc/issues ),欢迎使用者和贡献者加入QQ群 `1051164153`
 <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=bHFR7P3Qp1nsSPbsTw4KN_ZpFLUAblIU&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="MinDoc使用&amp;开发交流群" title="MinDoc使用&amp;开发交流群"></a>
@@ -38,17 +34,18 @@ MinDoc 的前身是 SmartWiki 文档系统。SmartWiki 是基于 PHP 框架 lara
 
 对于没有Golang使用经验的用户,可以从 [https://github.com/mindoc-org/mindoc/releases](https://github.com/mindoc-org/mindoc/releases) 这里下载编译完的程序。
 
-如果有Golang开发经验,建议通过编译安装,在此之前,您需要先安装Golang官方包管理工具,详见[Install dep](https://golang.github.io/dep/docs/installation.html)。
+如果有Golang开发经验,建议通过编译安装,要求golang版本不小于1.12(需支持`CGO`和`go mod`)。
 
 ```bash
+# 克隆源码
 git clone https://github.com/mindoc-org/mindoc.git
-
+# go包安装
 go mod tidy
-
+# 编译(sqlite需要CGO支持)
 go build -ldflags "-w"
-
+# 数据库初始化(此步骤执行之前,需配置`conf/app.conf`)
 ./mindoc install
-
+# 执行
 ./mindoc
 
 ```
@@ -64,7 +61,7 @@ MinDoc 如果使用MySQL储存数据,则编码必须是`utf8mb4_general_ci`。
 
 ```bash
 
-#邮件配置
+#邮件配置-示例
 #是否启用邮件
 enable_mail=true
 #smtp服务器的账号
@@ -100,6 +97,7 @@ HTTP_PORT                   程序监听的端口号
 举个栗子
 
 ```bash
+# TODO: 新版docker镜像将使用阿里云,配置中
 docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP_ADDR=10.xxx.xxx.xxx -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest
 ```
 ### docker-compose 一键安装
@@ -130,7 +128,8 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
         > docker-compose down
    - 删除并重新创建
         > docker-compose -f docker-compose.yml down && docker-compose up -d
-   更多 docker-compose 的使用相关的内容 请查看官网文档或百度
+        > 
+        > 更多 docker-compose 的使用相关的内容 请查看官网文档或百度
    
 # 项目截图
 
@@ -171,23 +170,24 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
 ![超级管理员后台](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204710.png)
 
 
-# 使用的技术
+# 使用的技术(TODO: 最新技术栈整理中,使用的第三方库升级中)
 
-- beego 1.10.0
-- mysql 5.6
-- editor.md Markdown 编辑器
-- bootstrap 3.2
-- jquery 库
-- webuploader 文件上传框架
-- Nprogress 库
-- jstree 树状结构库
-- font awesome 字体库
-- cropper 图片剪裁库
-- layer 弹出层框架
-- highlight 代码高亮库
-- to-markdown HTML转Markdown库
-- quill 富文本编辑器
-- vue 框架
+- [Beego](https://github.com/beego/beego) ~~1.10.0~~
+- MySQL 5.6
+- [editor.md](https://github.com/pandao/editor.md) Markdown 编辑器
+- [Bootstrap](https://github.com/twbs/bootstrap) 3.2
+- jQuery(https://github.com/jquery/jquery) 库
+- [WebUploader](https://github.com/fex-team/webuploader) 文件上传框架
+- [NProgress](https://github.com/rstacruz/nprogress) 库
+- [jsTree](https://github.com/vakata/jstree) 树状结构库
+- [Font Awesome](https://github.com/FortAwesome/Font-Awesome) 字体库
+- [Cropper](https://github.com/fengyuanchen/cropper) 图片剪裁库
+- [layer](https://github.com/sentsin/layer) 弹出层框架
+- [highlight.js](https://github.com/highlightjs/highlight.js) 代码高亮库
+- ~~to-markdown~~[Turndown](https://github.com/domchristie/turndown) HTML转Markdown库
+- ~~quill 富文本编辑器~~
+- [wangEditor](https://github.com/wangeditor-team/wangEditor) 富文本编辑器
+- [Vue.js](https://github.com/vuejs/vue) 框架
 
 
 # 主要功能
@@ -206,7 +206,7 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
 
 如果您还不熟悉GitHub的Fork and Pull开发模式,您可以阅读GitHub的文档(https://help.github.com/articles/using-pull-requests) 获得更多的信息。
 
-# 关于作者
+# 关于作者[lifei6671](https://github.com/lifei6671)
 
 一个不纯粹的PHPer,一个不自由的 gopher 。