Code Monkey home page Code Monkey logo

moell-blog's Introduction

Moell Blog

Moell Blog 是一个基于Laravel5.7 开发并支持markdown语法的博客。

功能

  • 支持Markdown, 文章实时预览效果
  • 图片拖拽上传
  • 支持七牛云存储
  • 支持多种编程语言代码高亮
  • 文章搜索
  • 文章分类
  • 文章标签
  • 自定义导航,分类设置为导航
  • 友情链接
  • 自定义页面
  • RSS
  • 评论插件 disqus

截图

首页

前端演示地址

查看 moell

安装

获取源码

git clone https://github.com/moell-peng/moell-blog.git

进入项目目录

cd moell-blog

安装项目依赖

composer install

生成.env

cp .env.example .env
php artisan key:generate

编辑.env环境配置

APP_URL=http://localhost #使用本地文件系统存储文件时,必须填写正确地址
APP_DEBUG=true #关闭调试

DB_HOST= #数据库地址
DB_PORT=3306 #数据库端口
DB_DATABASE= #数据库名称
DB_USERNAME= #数据库用户
DB_PASSWORD= #数据库密码

默认下使用了本地文件系统,需执行 php artisan storage:link 来创建符号链接。 可以通过 BLOG_DISK 来进行配置,支持 qiniu 和 public ,qiniu 配置请参照 filesystem.php 。

运行数据迁移和数据填充

php artisan migrate
php artisan db:seed

将项目根目录指向入口public目录

Nginx

location / {
		root   /www/moell-blog/public;
		try_files $uri $uri/ /index.php?$query_string;
		index  index.php index.html index.htm;
}

设置目录权限

chown -R nginx:nginx  storage/
chmod -R 755 public/
chown -R nginx:nginx  public/

调优

部署到线上可选,本地测试无需执行

php artisan optimize
php artisan config:cache
php artisan route:cache

后台登录, 后台地址: 域名/backend , email:[email protected] , password : moell.cn

讨论群

QQ:339803849 (欢迎PHPer,Laravel爱好者加入)

License

  • 使用Moell Blog构建应用,必须在页脚添加上Powered by Moell Blog字样,并且Moell Blog 必须链接到http://www.moell.cn
  • 在遵守以上规则的情况下,你可以享受等同于 MIT license 协议的授权。

moell-blog's People

Contributors

moell-peng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moell-blog's Issues

当前bug及解决方案

1、标签跳转有bug
blog详情页面,根据标签进行跳转的时候回报错,只需要在app/Http/Controllers/TagController.php 中添加
use App\Models\Tag;

2、多说评论short_name 不存在时错误
需要添加字段是否存在的判断就好了。resources/views/backend/system/index.blade.php
<div class='col-md-6'> <input type="text" value="{{ $system['duoshuo_short_name'])? $system['duoshuo_short_name'] : '' }}" class='form-control' name="duoshuo_short_name" id="duoshuo_short_name" placeholder="请输入多说评论short_name"> </div>

修改为
<div class='col-md-6'> <input type="text" value="{{ isset($system['duoshuo_short_name']) ? $system['duoshuo_short_name'] : '' }}" class='form-control' name="duoshuo_short_name" id="duoshuo_short_name" placeholder="请输入多说评论short_name"> </div>

最后感谢作者的分享,接下来我也会在此基础上不断扩展新功能。附上自己的blog
https://blog.yuhai.xin/

composer install 错误

老哥能更新一下composer.json吗?换了好几个源,每次都是卡在 reading......provider-webmozart from cache 上,在服务器上装会搞的服务器卡死,在本地安装的时候同样会卡在这一步,但是提示更详细些,,查了一下是项目依赖包与框架包不匹配.所以我猜测是composer.json的问题?
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #155)

ArticleController

$article = Article::findOrFail($id);
$article->read_count = $article->read_count + 1;
$article->save();

->

$article = Article::findOrFail($id);
$article->update(['read_count' => \DB::raw('read_count') + 1] );

php artisan migrate 报错

Illuminate\Database\QueryException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysql.column_stats' doesn't exist (SQL: ALTER TABLE systems CHANGE value value TEXT NOT NULL COLLATE utf8mb4_unicode_ci)

openssl genrsa -out server.key 2048

看到这个问题,https://learnku.com/laravel/t/27700
我也遇到了,研究了半天,发现是生成私钥的问题,换成这个就可以了。
openssl genrsa -out server.key 2048
openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650
那个帖子需要注册,我不想注册,随便在这给你留个言。

跑不起来

Whoops, looks like something went wrong.
1/1 FatalErrorException in AliasLoader.php line 63: Maximum function nesting level of '100' reached, aborting!

in C:\xampp\htdocs\moell-blog-master\vendor\laravel\framework\src\Illuminate\Foundation\AliasLoader.php line 63

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.