私有化部署or本地部署Qexo
•分享
87 2
Qexo 是一个快速、强大、美观的在线 静态博客编辑器。使用 GPL3.0 开源协议。支持包括且不限于在 Vercel 等平台部署, 为您的静态博客添加动态的元素
宝塔面板
在终端输入
git clone https://github.com/Qexo/Qexo
复制项目到服务器目录
cd Qexo
进入Qexo目录,建立configs.py
文件,把一下内容复制进去
import pymysql
pymysql.install_as_MySQLdb()
DOMAINS = ["127.0.0.1", "yoursite.com"]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'qexo',
'USER': 'root',
'PASSWORD': 'password',
'HOST': '127.0.0.1',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET sql_mode='STRICT_TRANS_TABLES'"
}
}
}
把以上的NAME
USER
PASSWORD
yoursite.com
修改为自己的
依次执行以下命令
pip3 install -r requirements.txt
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver --noreload
默认运行端口8000
运行你的网址
<div id="qexo-friends"></div>
<link rel="stylesheet" href="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/friends.css"/>
<script src="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/friends.js"></script>
<script>loadQexoFriends("qexo-friends", "https://cp.sunn.ee")</script>
<div id="friends-api"></div>
<link rel="stylesheet" href="https://unpkg.com/qexo-friends/friends.css"/>
<script src="https://unpkg.com/qexo-friends/friends-api.js"></script>
<script>qexo_friend_api("friends-api","https://cp.sgcd.net");</script>
<script src="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/talks.js"></script>
<link rel="stylesheet" href="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/talks.css">
<div id="qexot"></div>
<script>showQexoTalks("qexot", "https://cp.sunn.ee", 15)</script>
好用啊
就是这个好用