2015-04-12 03:04:14 +08:00
|
|
|
WBlog
|
|
|
|
=======
|
|
|
|
[![Build Status](https://travis-ci.org/windy/wblog.svg?branch=master)](https://travis-ci.org/windy/wblog)
|
2018-05-19 17:41:39 +08:00
|
|
|
[![Maintainability](https://api.codeclimate.com/v1/badges/545d8372a9dda70b77fe/maintainability)](https://codeclimate.com/github/windy/wblog/maintainability)
|
|
|
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/545d8372a9dda70b77fe/test_coverage)](https://codeclimate.com/github/windy/wblog/test_coverage)
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
为移动而生的 Ruby on Rails 开源博客. WBlog 基于 MIT 协议, 自由使用.
|
|
|
|
|
2018-05-19 17:41:39 +08:00
|
|
|
现已全面支持 Ruby on Rails 5.2 版本!!!
|
|
|
|
|
2015-04-12 03:04:14 +08:00
|
|
|
* 用户极为友好的阅读体验
|
|
|
|
* 自带干净的评论系统
|
|
|
|
* 简洁而不简单的发布博客流程
|
|
|
|
|
2018-05-19 17:41:39 +08:00
|
|
|
访问我的博客以体验: <http://yafeilee.com>
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2018-05-19 17:41:39 +08:00
|
|
|
后台禁止爬虫, 使用: <http://yafeilee.com/admin> 访问, 用户名密码可配置.
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
截图如下: <#screenshots>
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
### WBlog 的设计目标
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
* 优先以手机用户体验为主
|
2016-04-28 17:04:22 +08:00
|
|
|
* 独立干净的评论系统
|
2015-04-12 03:04:14 +08:00
|
|
|
* 良好的博客语法高亮支持
|
2016-04-28 17:04:22 +08:00
|
|
|
* 可邮件订阅
|
|
|
|
* Markdown 支持
|
|
|
|
* 尽可能独立
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
### 特色
|
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
* 优先支持移动端访问
|
|
|
|
* 响应式设计, 支持所有屏幕终端, 并且支持微信扫码继续阅读和分享
|
2015-04-12 03:04:14 +08:00
|
|
|
* 自带评论系统, 干净而方便
|
2016-04-28 17:04:22 +08:00
|
|
|
* Markdown 支持, 博客语法高亮, 方便技术性博客
|
|
|
|
* 开源可商用, 定制能力强
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
### 期望
|
|
|
|
|
|
|
|
成为 `Ruby on Rails` 下最好用的独立博客建站系统
|
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
### 开发环境
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
WBlog 是一个标准的 Ruby on Rails 应用. 开发环境依赖于:
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2016-08-06 23:18:34 +08:00
|
|
|
* Ruby ( = 2.3.1 )
|
2016-04-28 17:04:22 +08:00
|
|
|
* Postgresql ( >= 9.x )
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2015-04-27 22:12:18 +08:00
|
|
|
配置 WBlog:
|
|
|
|
|
|
|
|
```shell
|
2016-04-28 17:04:22 +08:00
|
|
|
gem install bundler
|
2015-04-27 22:12:18 +08:00
|
|
|
bundle install
|
|
|
|
cp config/application.yml.example config/application.yml
|
2016-04-28 17:04:22 +08:00
|
|
|
cp config/database.yml.example config/database.yml
|
2015-04-27 22:12:18 +08:00
|
|
|
```
|
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
更新对应配置: application.yml & database.yml.
|
|
|
|
|
|
|
|
对于配置有不明白的地方, 可以来这里咨询.
|
2015-04-27 22:12:18 +08:00
|
|
|
|
|
|
|
就这样, 可以尝试启动了:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
rails s
|
|
|
|
```
|
2015-04-12 03:04:14 +08:00
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
登录 http://localhsot:3000/admin 来发布第一篇博客.
|
|
|
|
|
2015-04-12 03:04:14 +08:00
|
|
|
### 发布应用
|
|
|
|
|
2016-04-28 17:04:22 +08:00
|
|
|
WBlog 采用了 `mina` 作为自动化发布工具, 使用 `nginx`, `puma` 为相关容器.
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
对应的发布流程在: [WBlog 的发布流程](https://github.com/windy/wblog/wiki)
|
|
|
|
|
|
|
|
### 技术栈
|
|
|
|
|
2018-05-19 17:41:39 +08:00
|
|
|
* Ruby on Rails 5.2.0
|
2016-08-07 00:44:11 +08:00
|
|
|
* Ruby 2.3.1
|
2016-04-28 17:04:22 +08:00
|
|
|
* Foundation 6
|
2015-04-12 03:04:14 +08:00
|
|
|
* mina
|
|
|
|
* slim
|
2016-04-28 17:04:22 +08:00
|
|
|
* Postgresql
|
2015-04-12 03:04:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
## Ruby 相关开源博客推荐
|
|
|
|
|
|
|
|
* writings.io( Ruby on Rails 4.0.2 ): <https://github.com/chloerei/writings>
|
|
|
|
* jekyll( Ruby Gem, Markdown, Static ): <http://jekyllrb.com/>
|
|
|
|
* octopress( Github Pages ): <http://octopress.org/>
|
|
|
|
* middleman( Ruby Gem, Static ): <https://github.com/middleman/middleman>
|
|
|
|
* robbin_site( Padrino ): <https://github.com/robbin/robbin_site>
|
2016-04-28 17:14:38 +08:00
|
|
|
|
|
|
|
### Screenshots
|
|
|
|
|
|
|
|
首页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot home](https://github.com/windy/wblog/raw/master/doc/wblog_s/home.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
小屏首页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot home small](https://github.com/windy/wblog/raw/master/doc/wblog_s/home-small.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
展开的小屏首页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot home hover](https://github.com/windy/wblog/raw/master/doc/wblog_s/home-small-hover.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
博客详情页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot post](https://github.com/windy/wblog/raw/master/doc/wblog_s/post.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
展开的博客详情页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot post hover](https://github.com/windy/wblog/raw/master/doc/wblog_s/post-hover.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
管理员登录页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot admin](https://github.com/windy/wblog/raw/master/doc/wblog_s/admin-login.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
管理页面板:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot admin](https://github.com/windy/wblog/raw/master/doc/wblog_s/admin-dashboard.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
发布新博客页:
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
![screenshot admin](https://github.com/windy/wblog/raw/master/doc/wblog_s/admin-post.png)
|
2016-04-28 17:20:38 +08:00
|
|
|
|
2016-04-28 17:14:38 +08:00
|
|
|
博客管理页:
|
|
|
|
|
2016-04-28 17:20:38 +08:00
|
|
|
![screenshot admin](https://github.com/windy/wblog/raw/master/doc/wblog_s/admin-posts.png)
|