hexo-submit-urls-to-search-engine Documentation
My native language is not English, if there are any inaccuracies, please contact me, thank you!
hexo-submit-urls-to-search-engine
is a plugin which can submit the new link of the Hexo to Google, Bing, Baidu search engine, that make search engines index your pages earlier.
For example, I publish an article, in 5 minutes, I can find it in Bing. Well done!
These three major search engines have occupied 97% of the global search engine market share (including Yahoo, ecosia using bing index). Later, I may add the function of submitting links to Yandex.
Telegram group: https://t.me/hexoseo
- 1. Register each webmaster platform
- 2. Configure hexo
- 3. update the plugin
- 4. response
- 5. References
Register each webmaster platform
All “record” in this section are filled into hexo’s _config.yml
,please use the format given below
Baidu
Baidu is a Chinese search engine. Please visit: https://cjh0613.com/20200603HexoSubmitUrlsToSearchEngine.html
Bing
Bing webmaster platform has new and old sites.
- Register, login Bing new webmaster platform( https://www.bing.com/webmasters )
- Add your site
- Click on Settings button on top right corner and then go to API Access section.
- Click on Generate API Key to create an API Key. Only one API key can be generated per user. Record the API key.
One of the biggest problems with Google Webmaster Tools is its lack of a complete API to programatically submit updated URLS for indexing. At the moment, Google’s Indexing APIonly allows submission of pages with specific kinds of structured data – JobPosting
or BroadcastEvent
embedded in a VideoObject
.
Google webmaster platform also has new and old sites. Please follow Google Indexing API Documentationto configure.
steps:
- Please follow Google Indexing API Documentationto configure.
- Only use the new search console, it is impossible to set your service account, please use the old Webmasters tool ,add the email to the old Webmasters tool.
- Put the json file of the google key in the root directory of the website (same location as the hexo _config.yml file)
Configure hexo
1.install
Please run in the hexo root directory:
1 | npm install --save hexo-submit-urls-to-search-engine |
2.Edit hexo _config.yml
(1)hexo_submit_urls_to_search_engine
Configure the hexo-submit-urls-to-search-engine
plugin, paste the following into _config.yml
of hexo.
1 | hexo_submit_urls_to_search_engine: |
After completing the above configuration, when you run the hexo generate
command in the Hexo root directory, a .txt
file will be generated to store the link to be pushed.
You can open this file to check whether the link is correct, if not, please open the _config.yml
of hexo to configure. You can also manually modify this .txt
file before pushing the link.
(2)deploy
If you have not added the deploy:
configuration item before, paste the following directly into the _config.yml
of hexo:
1 | deploy: |
After completing this step, you can automatically submit the links to the search engine when you run the hexo deploy
command. Of course, you need to run hexo generate
to generate the latest .txt file to store the links to be submited.
If you can submit successfully, please go to Github to Star this repo, thank you!
If the deploy:
configuration item has been set, directly pasting the above code block will prompt Configuration conflict, just add it under the existing deploy:
configuration item. Such as:
1 | deploy: |
Note: There is a -
before each type:
above
finish
Run:
1 | hexo clean && hexo generate && hexo deploy |
And enjoy!
If you can push successfully, please go to Github to click Star as support, thank you!
update the plugin
After you install this plugin, please watch this project from Github to get the plug-in upgrade prompt (choose Releases only
to get the upgrade prompt only, choose Watching will also push Issues, Pull requests, etc., sent by email)
If there is a new version of this plug-in, please run in the hexo root directory:
1 | npm update --save hexo-submit-urls-to-search-engine |
response
success response:
1 | Bing response: { d: null } |
References
The following is not complete… Some of them have no time to record, and I also refer to the articles I wrote before and their reference materials.