Code Monkey home page Code Monkey logo

mypersimmon's Introduction

MyPersimmon

macbook

本项目使用 PHP 框架 Laravel 5.4 进行开发。 项目依赖了部分云服务,如图片使用了七牛云储存。(目前必须,暂时没有加入本地存储图片的功能)
文章别名自动生成,使用了百度翻译功能。(必须) 接入了baidu ping服务,当发布文章的时候,自动向百度搜索引擎提交地址。(可以不使用) 系统后台使用了Vuejs + Element-UI实现前后端分离

博客功能具有以下功能

  • 分类管理
  • 文章管理
  • 标签管理
  • 评论管理
  • 导航管理
  • Redis 缓存
  • 好用的 Simplemde Markdown 编辑器
  • myPersimmon博客分类、文章都支持自定义URL
  • 支持Metaweblog API,接口地址:http://example.com/xmlrpc ,可以方便的使用离线发布工具写博客,比如我就喜欢使用Mweb写博客,然后通过Metaweblog API发布。

更多功能欢迎大家自己挖掘,或者有好的意见和建议欢迎拍砖。

项目概述

MyPersimmon 基于Laravel 5.4 版本开发。

目前运行环境

  • Nginx 1.8+
  • PHP 5.6+
  • MySQL 5.5+
  • Redis 3.0+

部署/安装

需要在系统上安装了基本的PHP运行环境、PHP包管理工具composer、Nodejs进行前端资源打包

基础安装

1. 克隆源代码

克隆源代码到本地:

> git clone https://github.com/Cong5/myPersimmon.git

2. 安装扩展包依赖

> composer install

4. 生成配置文件

> cp .env.example .env

然后在.env的配置文件里面新增如下配置项:

#七牛云储存
QINIU_ACCESSKEY=
QINIU_SECRETKEY=
QINIU_BUCKET=
#百度翻译
BAIDU_TRANSLATE_AK=
BAIDU_TRANSLATE_SK=
#百度ping
BAIDU_PING_SITE=
BAIDU_PING_TOKEN=
#错误信息推送到微信
SERVER_CHAN=

云服务AppKey和SecretKey申请地址:
七牛
百度翻译
百度ping
Server酱

5. 执行数据库迁移

php artisan migrate

6. 填充初始数据

php artisan db:seed

前端工具集安装

代码里自带编译后的前端代码,如果你不想开发前端样式的话,你是不需要配置前端工具集的,可本部分,看前后台入口部分

1). 安装 node.js

直接去官网 https://nodejs.org/en/ 下载安装最新版本。

2). 安装 Laravel Mix

npm install

如果嫌弃国内npm下载慢的话,可以使用淘宝NPM镜像:http://npm.taobao.org/

4). 直接 Mix 编译前端内容

开发环境使用:

npm run dev

生产环境请使用

npm run production

5). 监控修改并自动编译

npm run watch

前后台入口

如果要开启调试模式,请修改 .env 文件, APP_ENV=localAPP_DEBUG=true

默认用户名:[email protected] 密码:mypersimmon

至此, 安装完成。

License

使用 MyPersimmon 构建,或者基于 MyPersimmon 源代码修改的站点 必须 在页脚加上 Powered by Mr柿子 字样,并且必须链接到 https://cong5.net 上。

在遵守以上规则的情况下,你可以享受等同于 MIT 协议的授权。

mypersimmon's People

Contributors

cong5 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  avatar  avatar  avatar

mypersimmon's Issues

七牛报错问题(和解决方案)

我碰到这个问题,其实和这个issue一样:#24

描述如下:

  • 后台登录,报错500,截图:
    screen shot 2018-09-14 at 11 55 16 am

从这里可以看到,报错在 qiniu-laravel-storage/QiniuFilesystemServiceProvider.php 中 42行。

又找到这一行,代码如下:

$config['access'] ? $config['access'] : 'public'

因为项目中并没有配置access,所以这里报错了~ 。所以建议,七牛配置中,增加一个access属性。

又或者,升级 qiniu-laravel-storage包,最新代码中有解决这个问题:
https://github.com/zgldh/qiniu-laravel-storage/blob/master/src/QiniuFilesystemServiceProvider.php

isset($config['access']) ? $config['access'] : 'public',

增加了一个isset判断,从而能避免报错 :)

七牛云的问题以及个性化

我设置了七牛云的access key和secret key,但是上传图片后图片的链接不正确啊,找不到原因。还有,页面左侧的背景图以及头像是要在代码里面更改吗?

后台的模板路径怎么走

xxxx.com/myp#/posts/add 他的模板地址是在哪儿呢,我把文件都翻遍了也没有找到具体的这个文件

路由相关

您好, 我想请问下为何我用vue.js做的单页面刷新后,变成404了. 我参照了vue-router的apache配置,但是当我修改以后,会报错.于是我又在项目中加入了.htaccess,仍然不行.可我能在本地环境运行你的项目QWQ....初次接触,很多都不会,还望见谅...

你的包在 linux 下使用 npm install 导致错误

使用npm install 没有问题,使用 cnpm install 的话 cross-env 运行会报错
yarn install 写也是
一运行 npm run dev 就有问题了
npm ERR! Error: EPERM: operation not permitted, rename 'D:\vmroot\www\boke\node_modules\cross-env' -> 'D:\vmroot\www\boke\node_modules.cross-env.DELETE'
npm ERR! at moveAway (D:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (D:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at D:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:267:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)

但是在windows下缺没有问题

The only supported ciphers are AES-128-CBC and AES-256-CBC 错误

跟着教程走安装完后,进入后台或前台会出现The only supported ciphers are AES-128-CBC and AES-256-CBC 错误

然后需要输入 php artisan key:generate

才把错误解决掉

大神是不是要在教程前面提示一下 像我这样的初学者 比较容易一些 😁

执行npm run production 报错: Cannot find module 'node_modules/cross-env/bin/cross-env.js

npm run production

> @ production /Users/bluefeng5/PHP/blog
> node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

module.js:472
    throw err;
    ^

Error: Cannot find module '/Users/bluefeng5/PHP/blog/node_modules/cross-env/bin/cross-env.js'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:425:7)
    at startup (bootstrap_node.js:146:9)
    at bootstrap_node.js:540:3

npm ERR! Linux 3.13.0-107-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "production"
npm ERR! node v7.7.2
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! @ production: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ production script 'node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,


{
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/bluefeng5/PHP/blog/npm-debug.log

你好,安装的时候报错了

你好,我按照你的教程搭建,执行composer install的时候报错。我截取了一段代码麻烦您看一下:
Installing phpunit/php-code-coverage (4.0.8): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download phpunit/php-code-coverage from dist: The "https://files.phpcomposer.com/files/sebastianbergmann/php-code-coverage/ef7b2f56815df854e66ceaee8ebe9393ae36a40d.zip" file could not be downloaded: failed to open stream: Connection refused
Now trying to download from source
我尝试更新composer,也没有用

window环境下npm run dev 出现错误...

日志:

0 info it worked if it ends with ok
1 verbose cli [ 'E:\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 silly lifecycle @~predev: no script for predev, continuing
7 info lifecycle @~dev: @
8 verbose lifecycle @~dev: unsafe-perm in lifecycle true
9 verbose lifecycle @~dev: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;D:\phpStudy\WWW\laravel\myPersimmon\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;D:\phpStudy\MySQL\bin;D:\Program Files\VisualSVN Server\bin;C:\Program Files\Git\cmd;D:\phpStudy\php\php-7.0.12-nts;D:\phpStudy\php\php-7.0.12-nts\imagick;E:\soft\gs9.09\bin;E:\soft\Tesseract-OCR;E:\soft\ImageMagick-6.8.9-Q16;E:\nodejs\;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin;D:\Program Files\Vagrant\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\Administrator\AppData\Roaming\npm;C:\Python27
10 verbose lifecycle @~dev: CWD: D:\phpStudy\WWW\laravel\myPersimmon
11 silly lifecycle @~dev: Args: [ '/d /s /c',
11 silly lifecycle   'node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
12 silly lifecycle @~dev: Returned: code: 2  signal: null
13 info lifecycle @~dev: Failed to exec dev script
14 verbose stack Error: @ dev: `node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:283:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd D:\phpStudy\WWW\laravel\myPersimmon
17 verbose Windows_NT 6.1.7601
18 verbose argv "E:\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
19 verbose node v6.9.5
20 verbose npm  v5.0.3
21 error code ELIFECYCLE
22 error errno 2
23 error @ dev: `node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
23 error Exit status 2
24 error Failed at the @ dev script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 2, true ]

怎么解决?

运行出错,没有找到模板文件

你好,如果可以,可以将你的源码给我发一份吗?我按照安装步骤,一步一步执行,到最后出现前台出现laravel的欢迎页面,后台报模板找不到的错。

npm run dev 出现下面的情况是什么问题?

WARNING in .//.11.3.4@vue-loader/lib/template-compiler?{"id":"data-v-051c624c"}!.//.11.3.4@vue-loader/lib/selector.js?type=template&index=0!./resources/assets/backend/js/components
/pager/other/setting.vue
(Emitted value instead of an instance of Error) : component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/l
ist.html#key for more info.
@ ./resources/assets/backend/js/components/pager/other/setting.vue 9:2-226
@ ./resources/assets/backend/js/app.js
@ multi ./resources/assets/backend/js/app.js

分页问题

我看线上的分页似乎有问题, 总共就2页有数据, 怎么显示的16页

login 500 error

QiniuFilesystemServiceProvider line 42 ‘access’ not index

fix:
in filesystems.php
add this
disks=>[ 'qiniu'=>'access'=>'' ]

后台头像问题

image

\app\Http\Controllers\Backend\AuthController.php 66 行

$date 得到的结果 应该和 预期的不一样

还有个问题: 为啥 要设置 30 天 更新一次?这样 别人想设置个性头像不就每30天设置一次?

数据库迁移

image
我在执行php artisan migrate的时候报上图中的错,是怎么回事啊

文章功能

你好,我在进行文章添加的时候,发现你似乎没有进行文章标题的去重检查.当添加一个相同标题的文章时,会返回个500错误. 该错误在分类管理中也存在.

admin

后台地址可以发一下吗???

:( can't understand language

Hello! i am believe this is good tool, but i am can't understand your language, maybe you can doi it in english?

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.