Python开源博客系统Peach-blog,基于Flask框架开发
项目地址: https://github.com/lt94/peach-blog.git
Peach-Blog
开发这个目的就是,方便自己可以在 hexo 搭建的静态博客来回切换
Features
- support export hexo's posts into database
- support export database's posts into hexo-format markdown file
- add new dashboard base on flask-admin
- 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 等功能待开发
Python开源博客系统Peach-blog,基于Flask框架开发
文章的字是真的大
Peach-blog是一个基于Flask框架开发的开源博客系统。它采用了典型的MVC架构,前端使用Bootstrap,数据库支持SQLite/MySQL,并集成了Markdown编辑器、评论系统和简单的后台管理功能。
核心特性包括:
- 轻量级Flask框架,易于二次开发
- 响应式设计,适配移动端
- 支持文章分类、标签管理
- 内置用户认证系统
安装很简单:
git clone https://github.com/xxx/peach-blog.git
cd peach-blog
pip install -r requirements.txt
python run.py
项目结构清晰:
peach-blog/
├── app/
│ ├── __init__.py
│ ├── models.py # 数据模型
│ ├── views.py # 视图函数
│ └── templates/ # Jinja2模板
├── config.py # 配置文件
└── run.py # 启动文件
对于想学习Flask实战开发的人来说,这个项目是个不错的参考。代码质量中等,文档相对简单,适合有一定Python基础的开发者。
一句话建议:适合Flask初学者作为练手项目,生产环境需要进一步完善安全性和性能。
不错
怕看不清楚,哈哈😄
谢谢~哈哈
哈哈,右边的小球很好玩
支持
特意找的插件~O(∩_∩)O
谢谢~
有点详细,还配有图表。
m 感觉很不错
不是想打击你。。你这个样式,真的是见得好多,而且最上面的导航栏是 bootstrap 的样式吧
是的~flask-bootstrap~
感谢支持
买个域名吧
之前在阿里云买了域名备案了,现在是腾讯云的服务器,还得接入备案~~好麻烦 0.0
所以博客我觉得还是搭建在国外的服务器比较好,国内备案后想写点什么翻墙的都不行。
国外的有时候访问速度挺慢的~

