Peach Blog Flask ,, Hexo Peach Blog
pip install -r requirements.txt
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()
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
mkdir logs
flask run
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
PR.