开源一个博客系统 - Peach-blog 用 flask 开发的

2018-12-04 16:27:26 +08:00
 leetao94

项目地址: https://github.com/lt94/peach-blog.git

Peach-Blog

开发这个目的就是,方便自己可以在 hexo 搭建的静态博客来回切换

Features

  1. support export hexo's posts into database
  2. support export database's posts into hexo-format markdown file
  3. add new dashboard base on flask-admin
  4. add markdown support to flask-admin

Screenshots

Usages

environment

pip install -r requirements.txt

init database

before you execute following lines,make sure you have already create database

flask shell

you'are supposed to see, something like follow one:

Python 3.6.5
App: app [development]
Instance: path\to\instance

then

>>> from app import db
>>> db.create_all()
# create super user
>>> from app.models import User
>>> user = User(user_name='your name',password='your password', level=1)
>>> db.session.add(user)
>>> db.session.commit()

export hexo's posts into database

if you want to export hexo posts into database, change the value of config.py on line 14 (where the hexo's posts store),then

flask hexo g 

clean the posts,just use flask hexo c simplely

run the server

flask run

export database's posts into hexo-format markdown files

login in peach-blog admin, and step into post list pages, and then (see the picture)

the expoted post will generate under the directory where you set in config.py

About Dev

测试网址: http://132.232.71.126 测试账户: test/test, 没有修改,新增权限

还有命令行导出功能,rss 等功能待开发

2666 次点击
所在节点    Python
17 条回复
tulanxiaoxin
2018-12-04 16:45:29 +08:00
文章的字是真的大
xi2008wang
2018-12-04 16:47:44 +08:00
不错
leetao94
2018-12-04 16:52:30 +08:00
@tulanxiaoxin 怕看不清楚,哈哈😄
leetao94
2018-12-04 16:52:41 +08:00
@xi2008wang 谢谢~哈哈
liuxu
2018-12-04 16:56:58 +08:00
哈哈,右边的小球很好玩
hlwjia
2018-12-04 16:57:47 +08:00
支持
leetao94
2018-12-04 16:58:44 +08:00
@liuxu 特意找的插件~O(∩_∩)O
leetao94
2018-12-04 16:58:53 +08:00
@hlwjia 谢谢~
QQ2171775959
2018-12-04 17:07:15 +08:00
有点详细,还配有图表。
www5070504
2018-12-04 17:07:32 +08:00
m 感觉很不错
shuizhengqi
2018-12-04 17:10:32 +08:00
不是想打击你。。你这个样式,真的是见得好多,而且最上面的导航栏是 bootstrap 的样式吧
leetao94
2018-12-04 17:12:52 +08:00
@shuizhengqi 是的~flask-bootstrap~
leetao94
2018-12-04 17:13:02 +08:00
@www5070504 感谢支持
mrrobot97
2018-12-05 11:18:36 +08:00
买个域名吧
leetao94
2018-12-05 11:28:11 +08:00
@mrrobot97 之前在阿里云买了域名备案了,现在是腾讯云的服务器,还得接入备案~~好麻烦 0.0
mrrobot97
2018-12-05 15:57:05 +08:00
@leetao94 所以博客我觉得还是搭建在国外的服务器比较好,国内备案后想写点什么翻墙的都不行。
leetao94
2018-12-05 16:31:16 +08:00
@mrrobot97 国外的有时候访问速度挺慢的~

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/514250

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX