Giter Site home page Giter Site logo

cjh0613 / hexo-submit-urls-to-search-engine Goto Github PK

View Code? Open in Web Editor NEW
154.0 6.0 18.0 66 KB

Hexo plugin to submit URLs of new posts to Google, Bing, Baidu search engine , that make search engines index your pages earlier. Hexo插件:主动推送Hexo博客新链接至谷歌必应百度搜索引擎,提升网站收录质量和速度。

Home Page: https://en.cjh0613.com/20200603HexoSubmitUrlsToSearchEngine.html

License: GNU General Public License v3.0

JavaScript 100.00%
hexo-plugin hexo seo hexo-tag hexo-site hexo-blog hexoblog hexo-submit-urls-to-search-engine dployer google

hexo-submit-urls-to-search-engine's Introduction

hexo-submit-urls-to-search-engine

峡州仙士

The project is being tested publicly, welcome to use and submit feedback!

QQ Group:1079685183 点击直接调用 QQ 添加(凑人数)

Telegram group: https://t.me/hexoseo

If you don't want to be disturbed by excessive group messages, you can join and set it to mute, and then open the communication when you need it.

Roadmap

Roadmap, 开发计划、路线图

Documentation

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

English docs

Hexo plugin to submit URLs of new posts to Google, Bing, Baidu search engine to improve the quality and speed of website collection.

These three major search engines have occupied 97% of the global search engine market share (including Yahoo, ecosia, etc. using bing index). Later, I may add the function of submitting links to Yandex.

GitHub stars GitHub forks Please click on the top right of the page star and fork【请点击页面顶部靠右star与fork】

GitHub release GitHub top language GitHub code size in bytes GitHub repo size GitHub platforms GitHub issues GitHub closed issues Libraries.io dependency status for GitHub repo GitHub commit activity GitHub contributors

Quick start

Just "Quick start", visit English docs or 中文详细文档 for more.

1.install

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

or

yarn add 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, visit English docs or 中文详细文档 for more.

hexo_submit_urls_to_search_engine:
  submit_condition: count # Submitted condition, optional value: count | period, Now only supports count
  count: 10 # Submit the latest 10 links
  period: 900 # Submit a link with a modification time of 900 seconds
  google: 0 #  Whether to submit to Google, optional values: 1 | 0 (0: No; 1: Yes)
  bing: 1 #  Whether to submit to bing, optional value: 1 | 0 (0: no; 1: yes)
  baidu: 1 # Whether to submit to baidu, optional value: 1 | 0 (0: no; 1: yes)
  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!
  google_proxy: 0 # Set the proxy used to submit urls to Google
  replace: 0  # Whether to replace some substrings in links, optional value: 1 | 0 (0: no; 1: yes)
  find_what: http://cjh0613.github.io/blog
  replace_with: https://cjh0613.com

(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' } } }

hexo-submit-urls-to-search-engine's People

Contributors

cjh0613 avatar rapiz1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hexo-submit-urls-to-search-engine's Issues

【投票】是否有必要增加移动页面提交功能?

This poll is for Chinese search engines. / 这个投票针对的是中文搜索引擎。

是否有必要增加以下移动页面提交功能:

  • 向百度提交mip和amp
  • 向神马提交mip

具体请至搜索引擎站长平台处了解

如果您网页满足搜索引擎的要求,且觉得有必要就在下方接,数字+1

这里只报数便于统计,如您想讨论,请至 QQ 群:传送门

[报告问题] 你遇到的问题

Information 信息

Version/版本: latest

Platform/操作系统: windows

npm版本: 9.5.1

hexo版本: 5.4.2

科学上网方式: 没有

问题日志

INFO  Bing Submitting: https://blog.ning.moe/posts/Umami-fix/
Bing response:  { d: null }

结果是bing 那边没有今天提交的数据,配额也是满的。

在**内地推送至谷歌的情况

统计一下,大家在**内地能否使用本插件顺利推送链接至谷歌?能,回复 +1 ,并描述科学上网条件(操作系统,软件,协议及版本和其他必要信息);不能,回复 +0 ,并描述科学上网条件

[报告问题] 推送链接到Bing上之后,还是搜不到文章

你好,我根据你的教程之后设置了baidu和bing的推送,bing显示推送成功了,而且在网站上也能看到推送记录。但是无论是搜索site:网址或者直接搜索博客标题/内容还是搜不到,请问这个情况正常吗?目前大概隔了十几个小时,谢谢!

[报告问题] 无法卸载

Information 信息

Version/版本:
2.1

Platform/操作系统:
macos

npm版本:
9.6.6

hexo版本:
6.3.0

科学上网方式:

Expected behaviour 预期行为

答:
卸载 npm un

Actual behaviour 实际行为

答:
卸载报错:npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "link:": link:./scripts/eslint-plugin

Steps to reproduce the behaviour 重现步骤

答:

Feature Request 功能方面的建议

答:


【投票】是否有必要增加百度快速收录的 API 提交功能?

This poll is for Chinese search engines. / 这个投票针对的是中文搜索引擎。

是否有必要增加百度快速收录的 API 提交功能?

  • 可能要绑定百家号使用
  • 当天可收录展示
  • 提交 url 中有 daily 参数

具体请至搜索引擎站长平台处了解

如果您网页满足搜索引擎的要求可以使用此功能,且觉得有必要就在下方接,数字+1

这里只报数便于统计,如您想讨论,请至 QQ 群:传送门

[建议] 是否提供多站点链接提交功能

建议

推送百度会验证推送的站点和百度中绑定的站点相同,带 www 的站点和不带的站点会被标记为不是相同的站点。

所以是否可以支持多站点同时推送?


[报告问题] google response error403

报这个错误

Google response:  {
  error: {
    code: 403,
    message: 'Permission denied. Failed to verify the URL ownership.',
    status: 'PERMISSION_DENIED'
  }
}

我按照教程获取了json文件,并且修改了proxy

装不上一直报错,试了两台电脑了

Information 信息

Version/版本:
没有指定版本

Platform/操作系统: macOS

npm版本:
7.17.0

更高的版本也试过

hexo版本:

hexo: 4.2.1
hexo-cli: 3.1.0
os: Darwin 21.3.0 darwin x64
http_parser: 2.8.0
node: 10.14.1
v8: 6.8.275.32-node.36
uv: 1.23.2
zlib: 1.2.11
ares: 1.14.0
modules: 64
nghttp2: 1.34.0
napi: 3
openssl: 1.1.0j
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e

MacBook@MacBook-Pro hexo-yijile % npm install --save hexo-submit-urls-to-search-engine
(node:10754) ExperimentalWarning: The fs.promises API is experimental

removed 142 packages, changed 2 packages, and audited 819 packages in 4s

8 packages are looking for funding
  run `npm fund` for details

64 vulnerabilities (4 low, 18 moderate, 27 high, 15 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
MacBook@MacBook-Pro hexo-yijile % 

必应每天可以提交多少个URL?

刚才试用了一下,一下提交了200个URL,百度全部成功提交,但是必应好多都没有提交上去,好像是超出了每天提交的上限,所以想问一下必应每天提交的上限是多少?
谷歌的没有测试,因为没有梯子。。。

[建议] Bing提交成功后的response应该修改一下

建议

bing提交成功后, 一个url,一个response,是否应该更改这个机制呢
而且, {d: null}也像一个错误信息

INFO  Bing Submitting: https://blog.caoyu.info/autowired-and-resource.html
INFO  Bing Submitting: https://blog.caoyu.info/build-server-zsh.html
INFO  Bing Submitting: https://blog.caoyu.info/build-server-tomcat.html
INFO  Bing Submitting: https://blog.caoyu.info/build-server-java.html
INFO  Bing Submitting: https://blog.caoyu.info/build-server-mysql.html
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }
Bing response:  { d: null }

[报告问题] 安装插件后报错

Information 信息

Version/版本: 2.1.0

Platform/操作系统: Android

npm版本: 8.5.0

hexo版本: 5.4.0

科学上网方式:

Expected behaviour 预期行为

**答:**安装后成功生成

Actual behaviour 实际行为

**答:**安装后报错

Steps to reproduce the behaviour 重现步骤

**答:**运行 npm install --save hexo-submit-urls-to-search-engine

Feature Request 功能方面的建议

答:


错误日志:

FATAL YAMLException: Specified list of YAML types (or a single Type object) contains a non-Type object.
    at /vercel/path0/node_modules/hexo/node_modules/js-yaml/lib/schema.js:104:13
    at Array.forEach (<anonymous>)
    at Schema.extend (/vercel/path0/node_modules/hexo/node_modules/js-yaml/lib/schema.js:102:12)
    at Object.<anonymous> (/vercel/path0/node_modules/hexo/lib/plugins/renderer/yaml.js:5:36)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at module.exports (/vercel/path0/node_modules/hexo/lib/plugins/renderer/index.js:15:16)
    at Hexo.init (/vercel/path0/node_modules/hexo/lib/hexo/index.js:235:35)
    at /vercel/path0/node_modules/hexo-cli/lib/hexo.js:49:17
    at tryCatcher (/vercel/path0/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/vercel/path0/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/vercel/path0/node_modules/bluebird/js/release/promise.js:604:18) {
  reason: 'Specified list of YAML types (or a single Type object) contains a non-Type object.',
  mark: undefined
}
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 2

谷歌推送失败

尝试向谷歌推送,结果失败了,错误代码:

FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: connect ETIMEDOUT 172.217.27.138:443                                    
    at ClientRequest.<anonymous> (E:\Hexo\node_modules\gaxios\node_modules\node-fetch\lib\index.js:1455:11)                                               
    at ClientRequest.emit (events.js:315:20)                                 
    at TLSSocket.socketErrorListener (_http_client.js:426:9)                 
    at TLSSocket.emit (events.js:315:20)                                     
    at emitErrorNT (internal/streams/destroy.js:92:8)                        
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)                
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {   
  type: 'system',                                                            
  errno: 'ETIMEDOUT',                                                        
  code: 'ETIMEDOUT',                                                         
  config: {                                                                  
    method: 'POST',                                                          
    url: 'https://www.googleapis.com/oauth2/v4/token',                       
    data: {                                                                  
      grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',             
      assertion: 'eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaHJvbWUtc2VvQHJ1Z2dlZC1udWNsZXVzLTI4MjkwOC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9pbmRleGluZyIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTU5NDM3NDgxOCwiaWF0IjoxNTk0MzcxMjE4LCJzdWIiOm51bGx9.Ff-I2TpeNGTN7AXKVPo3QdlKzucPF6shltHIRsp6nxOmXfwFIB_NJBV2PatI59KKZuQlQjyqri02nmbnZcu2axoLaJB86msFcJw2ZwX9XxhDiv_KVsbqLRQjzYGI_fv8yqmegbiTapF6ZKLTrw1rCr3_KMW0Kp1UdiF1AydeZbgWpcCoumGr8s3bvx-2RkHtsqpis27Phuqbun3ePOJ4mgj87ozyu5qgN8mn5QX3bFu6dm-4NzrpZxCF-KbbmA0QoqjELlGJab2X6g9LbiAmY3lb4khHTTHLViKPcCjzCPO4bjJV8iO0-2aVcdJ3ZR3M4-nJKM7TSRCX5ynHgmvT4A'                          
    },                                                                       
    headers: { 'Content-Type': 'application/json', Accept: 'application/json' },                                                                          
    responseType: 'json',                                                    
    params: [Object: null prototype] {},                                     
    paramsSerializer: [Function: paramsSerializer],                          
    body: '{"grant_type":"urn:ietf:params:oauth:grant-type:jwt-bearer","assertion":"eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaHJvbWUtc2VvQHJ1Z2dlZC1udWNsZXVzLTI4MjkwOC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9pbmRleGluZyIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTU5NDM3NDgxOCwiaWF0IjoxNTk0MzcxMjE4LCJzdWIiOm51bGx9.Ff-I2TpeNGTN7AXKVPo3QdlKzucPF6shltHIRsp6nxOmXfwFIB_NJBV2PatI59KKZuQlQjyqri02nmbnZcu2axoLaJB86msFcJw2ZwX9XxhDiv_KVsbqLRQjzYGI_fv8yqmegbiTapF6ZKLTrw1rCr3_KMW0Kp1UdiF1AydeZbgWpcCoumGr8s3bvx-2RkHtsqpis27Phuqbun3ePOJ4mgj87ozyu5qgN8mn5QX3bFu6dm-4NzrpZxCF-KbbmA0QoqjELlGJab2X6g9LbiAmY3lb4khHTTHLViKPcCjzCPO4bjJV8iO0-2aVcdJ3ZR3M4-nJKM7TSRCX5ynHgmvT4A"}',                                  
    validateStatus: [Function: validateStatus]                               
  }                                                                          
}                                                                                                                               

错误截图:
1

[报告问题] Baidu response: {"remain":10,"success":0,"not_same_site":["https://xingpingcn.top/hexo%E6%8A%98%E8%85%BE.html",(...)

Information 信息

Version/版本:
2.0

Platform/操作系统:

npm版本:

hexo版本:

科学上网方式:

Expected behaviour 预期行为

答:

Actual behaviour 实际行为

答:
Baidu response: {"remain":10,"success":0,"not_same_site":["https://xingpingcn.top/hexo%E6%8A%98%E8%85%BE.html",(...)

Steps to reproduce the behaviour 重现步骤

答:
配置:
txt_path: submit_urls.txt
baidu_host: https://www.xingpingcn.top

submit_urls.txt中的链接为:https://xingpingcn.top

百度站长工具记录的网址为:https://www.xingpingcn.top

[问题] hexo s 触发推送

建议

答:
如题,一般不希望在开发环境中就向搜索引擎提交 URL,否则结果可想而知:
image

开发环境中,每次服务器刷新都会提交一次 URL,最后发现已经向搜索引擎提交了一万次 URL。。。。这样很可能被搜索引擎封掉。

其实,该插件只需要在 npm run build 时,也就是生产环境中执行一次就好了,开发环境真的没必要运行。


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.