[hexo 插件] 向谷歌、必应、百度提交 URLs 以快速被收录 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cjh0613
V2EX    Hexo

[hexo 插件] 向谷歌、必应、百度提交 URLs 以快速被收录

  •  
  •   cjh0613 2020-07-14 12:01:43 +08:00 3956 次点击
    这是一个创建于 1915 天前的主题,其中的信息可能已经有所发展或是发生改变。

    hexo 使用hexo-submit-urls-to-search-engine插件后,可主动推送 Hexo 博客新链接至谷歌、必应、百度搜索引擎站长平台以提升网站收录质量和速度

    之前的插件都只支持百度,仅供“局域网”使用……

    现在我的一篇文章刚发布 5 分钟,即可在必应搜索到。看吧,这就是 hexo-submit-urls-to-search-engine 的威力。

    中文文档

    安装

    在 Hexo 根目录下执行指令:

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

    使用

    在 Hexo 根目录下的 _config.yml 文件中,添加以下配置项:

    hexo_submit_urls_to_search_engine: # 提交最新的 n 个链接 count: 10 # 提交修改时间在 n 秒内的链接,单位秒。例如: # 有两个文件 a.txt 和 b.txt ,分别对应 https://yoursite.com/a.txt 和 https://yoursite.com/b.txt # 其更新时间距当前分别为 800s 和 1000s ( period 字段设为 900 ) # 则 https://yoursite.com/a.txt 会被提交,https://yoursite.com/b.txt 不会 period: 900 # 提交链接的条件,可选值:count | period 。不同取值的含义如下: # count:应用上述的 count 配置项 # period:应用上述的 period 配置项 submit_condition: count # 是否向 Google 提交,可选值:1 | 0 ( 0:否; 1:是) google: 0 # 是否向 Bing 提交,可选值:1 | 0 ( 0:否; 1:是) bing: 1 # 是否向 Baidu 提交,可选值:1 | 0 ( 0:否; 1:是) baidu: 1 # 文本文档的地址,要推送的链接会保存在此文本文档里 txt_path: submit_urls.txt # 在百度站长平台中注册的域名 baidu_host: https://yoursite.com/ # 百度自动推送 API 的 token (获取方式见插件文档: https://cjh0613.github.io/blog/20200603HexoSubmitUrlsToSearchEngine.html ) baidu_token: xxxxx # 在必应站长平台中注册的域名 bing_host: https://yoursite.com/ # 必应自动推送 API 的 token (获取方式见插件文档: https://cjh0613.github.io/blog/20200603HexoSubmitUrlsToSearchEngine.html ) bing_token: xxxxx # 在谷歌站长平台中注册的域名 google_host: https://yoursite.com/ # 存放 google key 的 json 文件,放于网站根目录 google_key_file: google_key.json 

    当然你也可以使用环境变量记录私钥,这样即使源码放在公开仓库,也不会泄露秘钥。

    完成上述配置后,你需要在 Hexo 根目录下运行 hexo generate 指令,该指令会生成一个 .txt 文件来存储要推送的链接。

    最后,在 Hexo 根目录下的 _config.yml 文件中,修改以下配置项,即可实现在执行 hexo deploy 指令时,自动推送你的链接:

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

    如果你使用插件时遇到了问题或者想进行更详细的设置,请查看插件的文档

    如果可用,烦请至 GitHub 点赞支持一下!

    1 条回复    2020-08-31 20:05:12 +08:00
    O5QQvmS5L8WH5poy
        1
    O5QQvmS5L8WH5poy  
       2020-08-31 20:05:12 +08:00
    不错,试用过的~
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5192 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 22ms UTC 09:28 PVG 17:28 LAX 02:28 JFK 05:28
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86