百度如今不重视个人站点,使用sitemap推送提示一直等待中,找了好久找到了这个插件hexo-baidu-url-submit.

安装插件

npm install hexo-baidu-url-submit –save

在根目录config.yml文件里加入以下代码:

baidu_url_submit:
count: 100 ## 提交最新的一个链接
host: soyl.tech ## 在百度站长平台中注册的域名
token: ******* ## 请注意这是您的秘钥, 所以请不要把博客源代码发布在公众仓库里!
path: baidu_urls.txt ## 文本文档的地址, 新链接会保存在此文本文档里

其次,记得查看_config.ym文件中url的值, 必须包含是百度站长平台注册的域名(一般有www), 比如:

# URL
url: https://soyl.tech
root: /
permalink: :year/:month/:day/:title/

加入新的deployer:

deploy:
- type: git ## 这是我原来的deployer
repository: git@github.com:HeySoyl/HeySoyl.github.io.git
branch: master
- type: baidu_url_submitter ## 这是新加的

执行 hexo d

INFO  Deploy done: git
INFO Deploying: baidu_url_submitter
INFO Submitting urls
https://soyl.tech/uncategorized/yonghuxieyi.html
https://soyl.tech/uncategorized/cloudkit_question.html
{"remain":2961,"success":39}
INFO Deploy done: baidu_url_submitter

看到”success”:39 表示提交成功了39条

文章引用来源:王辉的博客