diff --git a/README.md b/README.md index 6aeff47..b8917bd 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,9 @@ eshost: http://localhost:9200 可以容易的看到 [httpsecurityreport](https://httpsecurityreport.com/?report=deepzz.com) 评分`96`,[ssllabs](https://www.ssllabs.com/ssltest/analyze.html?d=deepzz.com&latest) 评分`A+`,[myssl](https://myssl.com/deepzz.com) 评分`A+`,堪称完美。这些安全的相关配置会在后面的部署过程中接触到。 -![show-home](https://st.deepzz.com/blog/img/show-home.png) -![show-home2](https://st.deepzz.com/blog/img/show-home2.png) - -![show-admin](https://st.deepzz.com/blog/img/show-admin.png) +![show-home](./docs/img/show-home.png) +![show-home2](./docs/img/show-home2.png) +![show-admin](./docs/img/show-admin.png) ### 更多文档 diff --git a/docs/README.md b/docs/README.md index 9f2e261..baa1d78 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,42 +2,58 @@ > 博客项目结构参考模版:https://github.com/deepzz0/appdemo -EiBlog 镜像仓库地址:https://hub.docker.com/u/deepzz0 - 用过其它博客系统,不喜欢,不够轻,不够快!这是我开发的第二款博客系统,也实在不想再在这件事情上过多纠结了。`EiBlog` 是一个比较稳定的博客系统,现已迭代至 `2.0` 版本,稳定性和维护你是不用担心的。 但它有着部署简单(上线复杂!)的特点,不推荐没有计算机知识的朋友搭建,欢迎咨询。该博客的个中优点(简洁、轻快,安全),等你体验。 ### 快速体验 -1、下载程序压缩包:到 [这里](https://github.com/eiblog/eiblog/releases) 下载 eiblog 相应系统压缩包,然后解压缩。 +这里以 mongodb 为例,更多支持的后端存储服务如下: -2、启动数据库服务:博客支持多种数据库后端,如MongoDB、MySQL、Postgres、SQLite等。 +| 类型(driver) | 地址(source)示例 | +| -------------- | ------------------------------------------------------------ | +| mongodb | mongodb://localhost:27017 | +| mysql | user:password@tcp(localhost:3306)/eiblog?charset=utf8mb4&parseTime=True&loc=Local | +| postgres | host=localhost port=5432 user=user password=password dbname=eiblog sslmode=disable | +| sqlite | /path/eiblog.db | +| sqlserver | sqlserver://user:password@localhost:9930?database=eiblog | +| clickhouse | tcp://localhost:9000?database=eiblog&username=user&password=password&read_timeout=10&write_timeout=20 | + +1、启动依赖服务,mongodb、elasticsearch: + +``` +$ docker run --name mongodb \ + -p 27017:27017 \ + -v ${PWD}/mgodb:/data/db \ + mongo:3.2 + +$ docker run --name elasticsearch \ + -p 9200:9200 \ + -v ${PWD}/esdata:/usr/share/elasticsearch/data \ + deepzz0/elasticsearch:2.4.1 +``` + +2、下载压缩包,到 [这里](https://github.com/eiblog/eiblog/releases) 下载 eiblog(非backup) 相应系统压缩包,然后解压缩。 + +3、修改配置,将数据库与ES地址修改为相应地址: ``` # 修改 conf/app.yml 数据库连接配置 -# driver可选:mongodb、mysql、postgres、sqlite、sqlserver、clickhouse、redis等 -# source为相应的连接地址 database: - driver: postgres - source: host=localhost port=5432 user=postgres dbname=eiblog sslmode=disable password=MTI3LjAuMC4x -``` + driver: mongodb + source: mongodb://localhost:27017 -3、启动 ES 搜索服务:博客使用 ElasticSearch 2.4.1 做为搜索引擎。 - -``` -# 修改 conf/app.yml ElasticSearch连接配置 -# 如果不启用搜索功能可以置空 +# 修改 conf/app.yml ES连接配置,如果不启用搜索功能可以置空 eshost: http://localhost:9200 ``` -4、启动博客程序。 +4、启动服务: ``` ./backend ``` -然后访问 `localhost:9000` 就可以了。 +然后访问 `localhost:9000` 就可以了,后台地址 `localhost:9000/admin/login`,默认账户密码 `deepzz/deepzz`。 ### 功能特性 @@ -49,16 +65,16 @@ eshost: http://localhost:9200 功能说明: -- [x] 博客归档,利用时间线帮助我们将归纳博文,内容少于一年按月归档,大于则按年归档。 -- [x] 博客专题,有时候博文是同一系列,专题能够帮助我们很好归纳博文,对阅读者是非常友好的。 -- [x] 标签系统,每篇博文都可以打上不同标签,使得在归档和专题不满足的情况下自定义归档,这块辅助搜索简直完美。 -- [x] 搜索系统,依托ElasticSearch实现的站内搜索,速度与效率并存,再加上google opensearch,搜索只流畅。 -- [x] 管理后台,内嵌全功能 `Typecho` 后台系统,全功能 `Markdown` 编辑器让你感觉什么是简洁清爽。 -- [x] 谷歌统计,由于google api的速度问题,从而实现了后端API异步统计,使得博客页面加载飞速。 -- [x] Disqus评论,国内评论系统不友好,因此选择disqus,又由于众所周知原因国内不能用,实现另类disqus评论方式。 -- [x] 多存储后端,支持mongodb、mysql、postgres、sqlite等存储后端。 -- [x] 七牛CDN,支持在 `Markdown` 编辑器直接上传附件,让你只考虑编辑内容,解放思想。 -- [x] 自动备份,支持多存储后端的备份功能,备份数据保存到七牛CDN上。 +* 博客归档,利用时间线帮助我们将归纳博文,内容少于一年按月归档,大于则按年归档。 +* 博客专题,有时候博文是同一系列,专题能够帮助我们很好归纳博文,对阅读者是非常友好的。 +* 标签系统,每篇博文都可以打上不同标签,使得在归档和专题不满足的情况下自定义归档,这块辅助搜索简直完美。 +* 搜索系统,依托ElasticSearch实现的站内搜索,速度与效率并存,再加上google opensearch,搜索只流畅。 +* 管理后台,内嵌全功能 `Typecho` 后台系统,全功能 `Markdown` 编辑器让你感觉什么是简洁清爽。 +* 谷歌统计,由于google api的速度问题,从而实现了后端API异步统计,使得博客页面加载飞速。 +* Disqus评论,国内评论系统不友好,因此选择disqus,又由于众所周知原因国内不能用,实现另类disqus评论方式。 +* 多存储后端,支持mongodb、mysql、postgres、sqlite等存储后端。 +* 七牛CDN,支持在 `Markdown` 编辑器直接上传附件,让你只考虑编辑内容,解放思想。 +* 自动备份,支持多存储后端的备份功能,备份数据保存到七牛CDN上。 当然,为了让整个系统加载速度更快,还做了更多优化措施: @@ -71,10 +87,9 @@ eshost: http://localhost:9200 可以容易的看到 [httpsecurityreport](https://httpsecurityreport.com/?report=deepzz.com) 评分`96`,[ssllabs](https://www.ssllabs.com/ssltest/analyze.html?d=deepzz.com&latest) 评分`A+`,[myssl](https://myssl.com/deepzz.com) 评分`A+`,堪称完美。这些安全的相关配置会在后面的部署过程中接触到。 -![show-home](https://st.deepzz.com/blog/img/show-home.png) -![show-home2](https://st.deepzz.com/blog/img/show-home2.png) - -![show-admin](https://st.deepzz.com/blog/img/show-admin.png) +![show-home](./img/show-home.png) +![show-home2](./img/show-home2.png) +![show-admin](./img/show-admin.png) ### 更多文档 diff --git a/docs/amusing.md b/docs/amusing.md index 71bc6fc..e2c435e 100644 --- a/docs/amusing.md +++ b/docs/amusing.md @@ -13,13 +13,13 @@ twitter: 每当你发部一个推文,你如果带上你的网址,它会自动给你展示成卡片的形式 -![twitter-pub](https://st.deepzz.com/blog/img/twitter-pub.png) +![twitter-pub](./img/twitter-pub.png) -![twitter-pub2](https://st.deepzz.com/blog/img/twitter-pub2.png) +![twitter-pub2](./img/twitter-pub2.png) 可以看到`,`之前是没有内容的,该内容是我们文章的描述。 ### Google OpenSearch 在 Chrome 浏览器上,你可以在输入网站后按 TAB 键进入搜索模式,如: -![opensearch](/Users/edz/go/src/github.com/eiblog/eiblog/opensearch.gif) \ No newline at end of file +![opensearch](./img/opensearch.gif) diff --git a/docs/img/article-description.png b/docs/img/article-description.png new file mode 100644 index 0000000..dad61c9 Binary files /dev/null and b/docs/img/article-description.png differ diff --git a/docs/img/article-title.png b/docs/img/article-title.png new file mode 100644 index 0000000..498dcd5 Binary files /dev/null and b/docs/img/article-title.png differ diff --git a/docs/img/blank.gif b/docs/img/blank.gif new file mode 100644 index 0000000..55736b6 Binary files /dev/null and b/docs/img/blank.gif differ diff --git a/docs/img/deepzz-home-page.jpeg b/docs/img/deepzz-home-page.jpeg new file mode 100644 index 0000000..3d90a69 Binary files /dev/null and b/docs/img/deepzz-home-page.jpeg differ diff --git a/docs/img/default_avatar.png b/docs/img/default_avatar.png new file mode 100644 index 0000000..fcd28c0 Binary files /dev/null and b/docs/img/default_avatar.png differ diff --git a/docs/img/dialog-box-without-all-contols.png b/docs/img/dialog-box-without-all-contols.png new file mode 100644 index 0000000..d94df0a Binary files /dev/null and b/docs/img/dialog-box-without-all-contols.png differ diff --git a/docs/img/opensearch.gif b/docs/img/opensearch.gif new file mode 100644 index 0000000..fbfd391 Binary files /dev/null and b/docs/img/opensearch.gif differ diff --git a/docs/img/show-admin.png b/docs/img/show-admin.png new file mode 100644 index 0000000..154fa0a Binary files /dev/null and b/docs/img/show-admin.png differ diff --git a/docs/img/show-home.png b/docs/img/show-home.png new file mode 100644 index 0000000..e989dc2 Binary files /dev/null and b/docs/img/show-home.png differ diff --git a/docs/img/show-home2.png b/docs/img/show-home2.png new file mode 100644 index 0000000..6f172fa Binary files /dev/null and b/docs/img/show-home2.png differ diff --git a/docs/img/twitter-pub.png b/docs/img/twitter-pub.png new file mode 100644 index 0000000..a0c778b Binary files /dev/null and b/docs/img/twitter-pub.png differ diff --git a/docs/img/twitter-pub2.png b/docs/img/twitter-pub2.png new file mode 100644 index 0000000..635b343 Binary files /dev/null and b/docs/img/twitter-pub2.png differ diff --git a/docs/writing.md b/docs/writing.md index 2da7b53..0b078ae 100644 --- a/docs/writing.md +++ b/docs/writing.md @@ -24,14 +24,14 @@ 结果是: -![article-title](https://st.deepzz.com/blog/img/article-title.png) +![article-title](./img/article-title.png) ### 文章描述 文章描述,主要是给`html->head->meta`中的 name 为 description 用的。现采用了一个临时的办法:在文章的第一行通过前缀识别(只看第一行)。 该前缀可到`conf/app.yml`设置,默认为`Desc:`,如: -![article-description](https://st.deepzz.com/blog/img/article-description.png) +![article-description](./img/article-description.png) ### 图片懒加载 博客系统提供图片懒加载功能(浏览到某个位置,图片才会加载),以此来提高页面加载速度。我们可根据需要是否使用。当然由此带来的坏处就是rss不能够正确加载图片。后续看是否解决这个问题或朋友提PR。 @@ -44,7 +44,7 @@ ``` ![sublime-dialog](https://st.deepzz.com/blog/img/dialog-box-without-all-contols.png) ``` -![sublime-dialog](https://st.deepzz.com/blog/img/dialog-box-without-all-contols.png) +![sublime-dialog](./img/dialog-box-without-all-contols.png) 懒加载,需要为该图片指定大小(长高): ``` @@ -61,7 +61,7 @@ x 为小写字母(x,y,z)中的 x。使页面未加载时也占了相应的 ### 摘要截取 摘要截取主要是提供给首页显示,如: -![deepzz-home-page](https://st.deepzz.com/blog/img/deepzz-home-page.jpg) +![deepzz-home-page](./img/deepzz-home-page.jpeg) 红框中圈出来的就是截取出来的内容。在 `conf/app.yml` 的配置项有两个: