From 36f7bcfe544808fb6e42e97160671b9502f0d355 Mon Sep 17 00:00:00 2001 From: 2z1c <1073355312@qq.com> Date: Fri, 19 Mar 2021 11:03:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feature:=20=E6=B7=BB=E5=8A=A0=E4=BA=86=20?= =?UTF-8?q?=E5=BE=AA=E7=8E=AFbuild=20=E7=9A=84=E8=84=9A=E6=9C=AC=E5=91=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restart.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/restart.sh b/restart.sh index dcdbab9..b44f962 100755 --- a/restart.sh +++ b/restart.sh @@ -10,6 +10,16 @@ function kill_teedoc() { function teedoc_build() { teedoc build + ret=$? + retry_count=1 + # 等于1表示,文件夹存在,重新运行 + while ((ret==1)) + do + teedoc build + ret=$? + let "retry_count=$retry_count+1" + echo $retry_count + done } function restart() { -- Gitee From 34badac992dfbd1c7107a81f0d7f6b5c2e007cba Mon Sep 17 00:00:00 2001 From: 2z1c <1073355312@qq.com> Date: Fri, 19 Mar 2021 13:37:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=97=B6=E5=80=99=E7=9A=84=E8=84=9A=E6=9C=AC=EF=BC=8C?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=20out/doc/static/css/theme=5Fdefault/ligh?= =?UTF-8?q?t.css=20=E6=96=87=E4=BB=B6=EF=BC=8C=E9=A6=96=E9=A1=B5=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restart.sh | 8 ++++++++ script/fix_icon_as_lower_right_corner.sh | 5 +++++ 2 files changed, 13 insertions(+) create mode 100755 script/fix_icon_as_lower_right_corner.sh diff --git a/restart.sh b/restart.sh index b44f962..eabcbe4 100755 --- a/restart.sh +++ b/restart.sh @@ -81,6 +81,10 @@ function copy_file() { python3 script/auto_creat_toc.py --input_file pages/index/zh/config.json --action copy } +function apply_patch() { + . script/fix_icon_as_lower_right_corner.sh +} + case $1 in "start") start @@ -107,6 +111,7 @@ case $1 in teedoc_src_release ;; "publish") + apply_patch teedoc_publish_to_server $2 ;; @@ -118,6 +123,9 @@ case $1 in # 覆盖相同的文档 copy_file ;; +"patch") + apply_patch + ;; *) if [ $# = 0 ]; then # 没有参数,默认 diff --git a/script/fix_icon_as_lower_right_corner.sh b/script/fix_icon_as_lower_right_corner.sh new file mode 100755 index 0000000..c085ea0 --- /dev/null +++ b/script/fix_icon_as_lower_right_corner.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# 修复右下角图标的错误 +echo "修改 out/doc/static/css/theme_default/light.css" +sed -i "s@url(/static/image/theme_default/to-top.svg)@url(/doc/static/image/theme_default/to-top.svg)@g" out/doc/static/css/theme_default/light.css -- Gitee