hexo博客快速被谷歌,必应,百度收录

对于Hexo博客,我们需要快速将内容提交给搜索引擎,以便保护原创,其他人仅搜索文章的关键字时才能看到我们的文章,从而提高了曝光率。

我最新开发的Hexo插件:hexo-submit-urls-to-search-engine,就是为了解决此问题,可以主动推送Hexo博客新链接至谷歌、必应、百度搜索引擎,提升网站收录质量和速度。之前的插件都只支持百度,仅供“局域网”使用……

Github地址 ,如果可用,烦请前往给个Star

中文文档:中文使用文档 中国内地用户务必阅读!

快速使用:

Quick start

Just “Quick start”, visit English doc for more.

1.install

npm install --save hexo-submit-urls-to-search-engine

2.Edit hexo config.yml

(1)hexo_submit_urls_to_search_engine

Of course, you can use environment variables to record the key, so that even if the source code is placed in a public warehouse, it will not reveal the secret key.

hexo_submit_urls_to_search_engine:
  submit_condition: count # count/period The submitted condition, only supports count now
  count: 10 ## Submit the latest 10 links
  period: 900 #A period of time, in seconds, the update time of the article is away from the running time of the plugin. Within this period of time, the link will be submitted
  google: 0 #  1/0->on/off   Submit to Google
  bing: 1 #Submit to bing
  baidu: 1 #Submit to baidu
  txt_path: submit_urls.txt ## The address of the text document, the link to be pushed will be saved in this text document
  baidu_host: https://cjh0613.github.io ## Domain name registered in Baidu webmaster platform
  baidu_token: xxxxx ## Please note that this is your secret key, so do not publish the website source code in the public repository!
  bing_host: https://cjh0613.github.io ## Domain name registered in Bing webmaster platform
  bing_token: xxxxx ## Please note that this is your secret key, so do not publish the website source code in the public repository!
  google_host: https://cjh0613.github.io ## Domain name registered in Google webmaster platform
  google_key_file: Project.json #Store the json file of the google key in the root directory of the website (same location as the hexo config.yml file), please do not publish the source code of the website in the public warehouse!

(2)deploy

deploy:
- type: cjh_google_url_submitter
- type: cjh_bing_url_submitter
- type: cjh_baidu_url_submitter

If you can push successfully, please click “Star” as support, thank you!

3.finish

Run:

hexo clean && hexo generate && hexo deploy

And enjoy!

success response:

Bing response:  { d: null }
Baidu response:  {"remain":2999,"success":1}
Google response:  { urlNotificationMetadata:
   { url:
      'https://cjh0613.github.io',
     latestUpdate:
      { url:
         'https://cjh0613.github.io',
        type: 'URL_UPDATED',
        notifyTime: '2020-06-12T05:37:25.701779228Z' } } }

你可能感兴趣的:(来自本人博客)