From 41dcdb89c3c57f87178cb6156bb59c94fba267e4 Mon Sep 17 00:00:00 2001 From: cjh0613 Date: Fri, 7 Aug 2020 17:13:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BB=A5=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=BF=9D=E5=AD=98=20baidu,=20bing=20Token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/baidu_submitter.js | 3 +++ lib/bing_submitter.js | 4 +++- package.json | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/baidu_submitter.js b/lib/baidu_submitter.js index 04da37d..3962ea9 100644 --- a/lib/baidu_submitter.js +++ b/lib/baidu_submitter.js @@ -10,6 +10,9 @@ module.exports = function(args) { var urlsPath = config.hexo_submit_urls_to_search_engine.txt_path; var host = config.hexo_submit_urls_to_search_engine.baidu_host; var token = config.hexo_submit_urls_to_search_engine.baidu_token; + if(token==0){ + token = process.env.BAIDU_TOKEN; + } var publicDir = this.public_dir; var UrlsFile = pathFn.join(publicDir, urlsPath); diff --git a/lib/bing_submitter.js b/lib/bing_submitter.js index a671ee0..8477ca5 100644 --- a/lib/bing_submitter.js +++ b/lib/bing_submitter.js @@ -11,7 +11,9 @@ module.exports = function(args) { var urlsPath = config.hexo_submit_urls_to_search_engine.txt_path; var host = config.hexo_submit_urls_to_search_engine.bing_host; var token = config.hexo_submit_urls_to_search_engine.bing_token; - +if(token==0){ + token = process.env.BING_TOKEN; + } var publicDir = this.public_dir; var UrlsFile = pathFn.join(publicDir, urlsPath); cjhreadline.readFileToArr(UrlsFile, function (data) { diff --git a/package.json b/package.json index 43cdfba..511ee36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-submit-urls-to-search-engine", - "version": "1.0.1", + "version": "1.1.1", "description": "Submit new posts urls to Google,Bing,Baidu search engine to improve the quality and speed of website collection", "main": "index.js", "scripts": { @@ -22,7 +22,7 @@ ], "author": { "name": "CJH-Bruce", - "url": "https://cjh0613.github.io/en" + "url": "https://en.cjh0613.com/" }, "license": "GPL-3.0-only", "dependencies": {