- 基于Python实现自动推送Hexo博客文章至百度,加速百度收录博客文章
- 确保电脑中已安装python;
- 确保已安装pyyaml模块,安装方法:
pip install pyyaml
- Ubuntu用户请确保已安装curl命令,安装方法:
sudo apt install curl
- 确保你的博客基于Hexo搭建且主题为Next | Jacman | Yelee | Apollo【暂时只测试了这几个主题,后续有需要的话再增加】;
- 有百度站长平台账号且已绑定你的博客站点,方法平台里写的很清楚了;
- 直接在我的项目主页 download zip 或者git bash下执行
git clone https://github.com/Lemon-XQ/Hexo-BaiduPushTool.git
- 打开_urlconfig.yml,填入你的博客地址、使用主题、百度主动推送接口,保存
- 双击baidupush.bat文件,等待推送完成
git clone https://github.com/Lemon-XQ/Hexo-BaiduPushTool.git
cd Hexo-BaiduPushTool
vi _urlconfig.yml
填写相应信息后保存退出python BaiduPush.py
等待推送完成
填写配置文件时,请注意yaml语法!即URL:
后需加一个空格!否则会报错