Skip to content

Commit 738dc6a

Browse files
committed
update readme.md
1 parent 0554fe0 commit 738dc6a

1 file changed

Lines changed: 82 additions & 7 deletions

File tree

readme.md

Lines changed: 82 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Moell Blog
22

3-
Moell Blog 是一个基于Laravel5.7 开发并支持markdown语法开源的简易博客
3+
Moell Blog 是一个基于Laravel5.7 开发并支持markdown语法的博客
44

55
### 功能
66
* 支持Markdown, 文章实时预览效果
@@ -16,20 +16,95 @@ Moell Blog 是一个基于Laravel5.7 开发并支持markdown语法开源的简
1616
* RSS
1717
* 评论插件 disqus
1818

19+
### 截图
20+
21+
![首页](http://moell.cn/uploads/blog/new-index.png "首页")
22+
1923
### 前端演示地址
2024
查看 [moell](http://moell.cn "moell")
2125

22-
### 安装文档
23-
参阅 [Document](http://www.moell.cn/article/1 "Document")
26+
### 安装
2427

25-
### 讨论群
26-
QQ:339803849 (欢迎PHPer,Laravel爱好者加入)
28+
获取源码
29+
```shell
30+
git clone https://github.com/moell-peng/moell-blog.git
31+
```
2732

28-
### 截图
33+
进入项目目录
34+
```shell
35+
cd moell-blog
36+
```
37+
38+
安装项目依赖
39+
```shell
40+
composer install
41+
```
42+
43+
生成.env
44+
```shell
45+
cp .env.example .env
46+
php artisan key:generate
47+
```
48+
49+
编辑.env环境配置
50+
51+
```shell
52+
APP_URL=http://localhost #使用本地文件系统存储文件时,必须填写正确地址
53+
APP_DEBUG=true #关闭调试
54+
55+
DB_HOST= #数据库地址
56+
DB_PORT=3306 #数据库端口
57+
DB_DATABASE= #数据库名称
58+
DB_USERNAME= #数据库用户
59+
DB_PASSWORD= #数据库密码
60+
```
61+
62+
默认下使用了本地文件系统,需执行 `php artisan storage:link` 来创建符号链接。 可以通过 `BLOG_DISK` 来进行配置,支持 qiniu 和 public ,qiniu 配置请参照 filesystem.php 。
2963

30-
![首页](http://moell.cn/uploads/blog/new-index.png "首页")
3164

3265

66+
运行数据迁移和数据填充
67+
```shell
68+
php artisan migrate
69+
php artisan db:seed
70+
```
71+
72+
73+
74+
将项目根目录指向入口public目录
75+
**Nginx**
76+
77+
```shell
78+
location / {
79+
root /www/moell-blog/public;
80+
try_files $uri $uri/ /index.php?$query_string;
81+
index index.php index.html index.htm;
82+
}
83+
```
84+
85+
设置目录权限
86+
```shell
87+
chown -R nginx:nginx storage/
88+
chmod -R 755 public/
89+
chown -R nginx:nginx public/
90+
```
91+
调优
92+
> 部署到线上可选,本地测试无需执行
93+
94+
```shell
95+
php artisan optimize
96+
php artisan config:cache
97+
php artisan route:cache
98+
```
99+
100+
101+
后台登录, 后台地址: 域名/backend , email:moell@foxmail.com , password : moell.cn
102+
103+
104+
105+
### 讨论群
106+
QQ:339803849 (欢迎PHPer,Laravel爱好者加入)
107+
33108
### License
34109
* 使用Moell Blog构建应用,必须在页脚添加上Powered by Moell Blog字样,并且Moell Blog 必须链接到http://www.moell.cn
35110
* 在遵守以上规则的情况下,你可以享受等同于 [MIT license](http://opensource.org/licenses/MIT) 协议的授权。

0 commit comments

Comments
 (0)