Into

Nothing to say…

Install two plugins

  • hexo-generator-baidu-sitemap
  • hexo-baidu-url-submit

hexo-generator-baidu-sitemap

  • Installation
1
npm install hexo-generator-baidu-sitemap --save
  • Setup

In you _config.yml add:

1
2
baidusitemap:
path: baidusitemap.xml
  • Use

It’s will create a file named baidusitemap.xml automaticlly when you deploy your to GitHub

hexo-baidu-url-submit

  • Installation
1
npm install hexo-baidu-url-submit --save
  • Setup

In you _config.yml add:

1
2
3
4
5
6
7
8
9
10
11
12
baidu_url_submit:
count: 3 ### last 3 urls will be submitted

# your site domain
# just like: url: http://www.yourdomain.com before you see
# notice without 'http://' or 'https://'
host: www.yourdomain.com

# your token here.
# find out in 'https://ziyuan.baidu.com/linksubmit/index?site=http://www.yourdomain.com/'
token: your-token-here
path: baidu_urls.txt

and add - type: baidu_url_submitter to your config.yml:

1
2
3
4
5
deploy:
- type: git
repo: who@github.com:who/repo.address.git
branch: master
- type: baidu_url_submitter
  • principle

    1. Create baidu_urls.txt and filled last 3 ursl in it when hexo denerate.
    2. Submiting your 3 new urls to baidu when hexo deploy, also it will submit to Git whilc is your another source in _config.yml