Code Monkey home page Code Monkey logo

blog's Introduction

项目概述

这是我的个人博客,使用 Laravel 5.5Vue 2.0 框架进行开发。

系统后台使用 Vuejs + Element-UI + JWT 实现了前后端分离。

博客功能

前端:

  • 分类导航
  • 标签云
  • 文章日志
  • 全文搜索
  • SEO 友好 URL
  • RSS 订阅(未实现)

管理后台:

  • Dashboard
  • 分类管理
  • 文章管理
  • 标签管理
  • 访客记录
  • About 页面管理
  • Simplemde Markdown 编辑器 + 图片拖拽上传
  • Log 日志查阅(未实现)

运行环境要求

  • Nginx 1.8+
  • PHP 7.1+
  • Mysql 5.7+
  • Elasticsearch 5.6

部署/安装

本项目代码使用 Docker PHP 开发环境 Laradock 进行开发和部署。

基础安装

1. 克隆源代码

git clone [email protected]:Jochen-z/blog.git

2. 安装扩展包依赖

composer install

3. 生成配置文件

cp .env.example .env

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

为了生成 SEO 友好的文章 URL,使用了百度翻译 API。(必须)

 # 数据库
 DB_CONNECTION=
 DB_HOST=
 DB_PORT=
 DB_DATABASE=
 DB_USERNAME=
 DB_PASSWORD=

 # 百度翻译平台
 BAIDU_TRANSLATE_APP_ID=
 BAIDU_TRANSLATE_KEY=

4. 生成秘钥

php artisan key:generate

5. 生成 JWT 的 secret

php artisan jwt:secret

6. 创建符号链接

php artisan storage:link

7. 生成数据表及测试数据

php artisan migrate --seed

8. 创建 Elasticsearch 索引

php artisan es:init

9. 开启流量统计定时器

crontab -e

* * * * * php /you/project/path/artisan schedule:run

前端框架安装

1. 安装前端所需要的依赖

yarn install

2. 编译前端内容

开发环境使用:

npm run dev

生产环境请使用:

npm run production

链接入口

管理员账号密码如下:

username: [email protected]
password: 123456

至此, 安装完成 ^_^。

如果你发现 bugs,或者有一些好的建议,欢迎 issue。

blog's People

Contributors

jochen-z avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

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.