Skip to content
/ blog Public template
forked from songquanpeng/blog

基于 Node.js 的个人博客系统. Node.js based blog system.

License

Notifications You must be signed in to change notification settings

ionce007/blog

Repository files navigation

Blog

Code Size license release

Click here to expend English readme

Description

  • This is a blog system powered by Express.js and React.
  • Demonstrations

Highlights

  1. You can use a code editor to edit your content (built-in ACE code editor with multiple themes).
  2. Easy to configure and integrate with disqus and statistics system.
  3. You can copy from OneNote or any other programs and paste your content with formatting (with the paste with formatting feature, don't forget to set the page type to raw).
  4. You can use this to deploy your single page web application (such as a game), just paste the code and set the page type to raw.
  5. System deploy is extremely simple, no need to configure the database (here I use SQLite as the default database, but it's easy to move to other database, just by modifying the knexfile.js).
  6. Multiple themes available:
    1. Bulma: default theme.
    2. Bootstrap: blog-theme-bootstrap.
    3. W3: blog-theme-w3.
    4. V2ex: blog-theme-v2ex.
    5. Next: blog-theme-next.

Deployment

git clone --recurse-submodules https://github.com/songquanpeng/blog.git
cd blog
npm install
npm run build  # For Windows user, please run `npm run build2` instead
npm start

How to update it?

git pull
npm install
npm run migrate

描述

技术栈:Express.js + Knex + SQLite + Bulma.css + React + Ant Design

特点:

  1. 支持主题。
  2. 无需配置数据库,开箱即用(如果你不想用 SQLite,请修改 knexfile.js 配置文件)。
  3. 内置 ACE 代码编辑器,附带多种代码主题。

主题

  1. Bulma:Bulma CSS 风格主题,内置的默认主题。
  2. Bootstrap:Bootstrap 风格主题
  3. W3:W3.css 风格主题
  4. V2ex: V2ex 风格主题
  5. Next: Hexo Next 风格主题.

注意

  1. 如需更改主题,打开后台管理系统中的 setting 页面,下拉框中找到 theme,修改后点击 submit,之后博客系统会主动关闭,这时依赖 pm2 将其重启,重启后用的就是新的主题了,记得浏览器 Ctrl + F5 刷新缓存。
  2. 由于精力有限,部分主题可能由于未能及时随项目更新导致存在问题。

演示

  1. 我的博客 (可能并非最新版本).
  2. Heroku App (后台管理系统地址 默认用户名 admin 以及密码 123456)

桌面端首页 后台管理页面文章列表页面 编辑器页面

用法

部署

git clone --recurse-submodules https://github.com/songquanpeng/blog.git
cd blog
npm install
npm run build  # Windows 用户请运行 `npm run build2`
npm start

更新

git pull
npm install
npm run migrate

About

基于 Node.js 的个人博客系统. Node.js based blog system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • EJS 13.8%
  • CSS 5.1%
  • Python 1.2%
  • Other 0.4%