From d89cb4f0861603ecfafdbdd3e3fada105001749a Mon Sep 17 00:00:00 2001 From: jiangzhonglian Date: Mon, 18 May 2020 22:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9C=80=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- book.json | 10 ++++---- index.html | 70 -------------------------------------------------- run_website.sh | 34 ------------------------ src/script.py | 20 +++++++-------- 5 files changed, 16 insertions(+), 120 deletions(-) delete mode 100644 index.html diff --git a/.travis.yml b/.travis.yml index 0c4601e0..ccd18059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,5 +31,5 @@ env: - GH_UN=jiangzhonglian - GH_EMAIL=jiang-s@163.com - GH_USER=apachecn - - GH_REPO=pytorch-doc-zh + - GH_REPO=AiLearning - GH_BRANCH=gh-pages diff --git a/book.json b/book.json index 8facf2af..18cbada0 100644 --- a/book.json +++ b/book.json @@ -30,13 +30,13 @@ ], "pluginsConfig": { "github": { - "url": "https://github.com/apachecn/pytorch-doc-zh" + "url": "https://github.com/apachecn/AiLearning" }, "github-buttons": { "buttons": [ { "user": "apachecn", - "repo": "pytorch-doc-zh", + "repo": "AiLearning", "type": "star", "count": true, "size": "small" @@ -51,7 +51,7 @@ "elements": [".gitbook-link"] }, "edit-link": { - "base": "https://github.com/apachecn/pytorch-doc-zh/blob/master", + "base": "https://github.com/apachecn/AiLearning/blob/master", "label": "编辑本页" }, "sharing": { @@ -113,7 +113,7 @@ "buttons": [ { "user": "apachecn", - "repo": "pytorch-doc-zh", + "repo": "AiLearning", "type": "star", "count": true, "size": "small" @@ -162,7 +162,7 @@ "noPowered": false }, "ga": { - "token": "UA-102475051-10" + "token": "UA-127082511-1" }, "baidu": { "token": "75439e2cbd22bdd813226000e9dcc12f" diff --git a/index.html b/index.html deleted file mode 100644 index df08c3d1..00000000 --- a/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
now loading...
- - - - - - diff --git a/run_website.sh b/run_website.sh index 37ae1d71..7c095ff8 100644 --- a/run_website.sh +++ b/run_website.sh @@ -9,39 +9,5 @@ python3 src/script.py "home" "powered" python3 src/script.py "home" "gitalk" gitbook build ./ _book - -# versions="0.2 0.3 0.4 1.0 1.2 1.4 LatestChanges" -# for version in $versions;do -# loginfo "===========================================================" -# loginfo "开始", ${version}, "版本编译" - -# echo "cp book.json docs/${version}" -# cp book.json docs/${version} - -# # 替换 book.json 的编辑地址 -# echo "python3 src/script.py ${version} book" -# python3 src/script.py ${version} "book" - -# echo "cp -r node_modules docs/${version}" -# rm -rf docs/${version}/node_modules -# cp -r node_modules docs/${version} - -# echo "gitbook install docs/${version}" -# gitbook install docs/${version} - -# echo "python3 src/script.py ${version} powered" -# python3 src/script.py ${version} "powered" - -# echo "python3 src/script.py ${version} gitalk" -# python3 src/script.py ${version} "gitalk" - -# echo "gitbook build docs/${version} _book/docs/${version}" -# gitbook build docs/${version} _book/docs/${version} - -# # 注释多余的内容 -# # echo "python3 src/script.py ${version} index" -# # python3 src/script.py ${version} "index" -# done - # # rm -rf /opt/apache-tomcat-9.0.17/webapps/test_book # # cp -r _book /opt/apache-tomcat-9.0.17/webapps/test_book diff --git a/src/script.py b/src/script.py index a16f7e00..7fac2dbd 100644 --- a/src/script.py +++ b/src/script.py @@ -53,8 +53,8 @@ if __name__ == "__main__": tag = False else: filename = "docs/%s/book.json" % version - str1 = "https://github.com/apachecn/pytorch-doc-zh/blob/master" - str2 = "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/%s" % version + str1 = "https://github.com/apachecn/AiLearning/blob/master" + str2 = "https://github.com/apachecn/AiLearning/blob/master/docs/%s" % version elif u_type == "powered": if version == "home": @@ -80,10 +80,10 @@ if __name__ == "__main__": '\\n
'+ '\\n
'+ '\\n

我们一直在努力

'+ - '\\n

apachecn/pytorch-doc-zh

'+ - '\\n

'+ - '\\n '+ - '\\n '+ + '\\n

apachecn/AiLearning

'+ + '\\n

'+ + '\\n '+ + '\\n '+ '\\n ML | ApacheCN

'+ '\\n
'+ '\\n
'+ @@ -99,19 +99,19 @@ if __name__ == "__main__": '\\n var _hmt = _hmt || [];'+ '\\n (function() {'+ '\\n var hm = document.createElement("script");'+ - '\\n hm.src = "https://hm.baidu.com/hm.js?38525fdac4b5d4403900b943d4e7dd91";'+ + '\\n hm.src = "https://hm.baidu.com/hm.js?33149aa6702022b1203201da06e23d81";'+ '\\n var s = document.getElementsByTagName("script")[0]; '+ '\\n s.parentNode.insertBefore(hm, s);'+ '\\n })();'+ '\\n '+ '\\n'+ - '\\n '+ + '\\n '+ '\\n '+ '\\n
'+ '\\n'+ @@ -129,7 +129,7 @@ if __name__ == "__main__": '\\n const gitalk = new Gitalk({'+ '\\n clientID: \\'2e62dee5b9896e2eede6\\','+ '\\n clientSecret: \\'ca6819a54656af0d87960af15315320f8a628a53\\','+ - '\\n repo: \\'pytorch-doc-zh\\','+ + '\\n repo: \\'AiLearning\\','+ '\\n owner: \\'apachecn\\','+ '\\n admin: [\\'jiangzhonglian\\', \\'wizardforcel\\'],'+ '\\n id: md5(location.pathname),'+