diff --git a/loop_docs-zh-cn.sh b/loop_docs-zh-cn.sh index aee76a8e..d98e9f53 100644 --- a/loop_docs-zh-cn.sh +++ b/loop_docs-zh-cn.sh @@ -26,7 +26,8 @@ for file in `find ./i18n/zh-cn/docusaurus-plugin-content-docs/current/ -name "*. # note only works on linux, forget about it when attempting to run on macos # hide hugo toc $SED_INPLACE 's/{{< toc >}}//' $file - $SED_INPLACE 's/{{< version >}}/1.18.2/g' $file + $SED_INPLACE 's/dl.gitea.com\/gitea\/{{< version >}}/dl.gitea.com\/gitea\/main/g' $file + $SED_INPLACE 's/{{< version >}}/main-nightly/g' $file $SED_INPLACE 's/{{< relref "doc\///g' $file $SED_INPLACE 's/.zh-cn.md/.md/g' $file $SED_INPLACE 's/" >}}//g' $file diff --git a/loop_docs.sh b/loop_docs.sh index 5ed9be3b..50b74e22 100644 --- a/loop_docs.sh +++ b/loop_docs.sh @@ -24,6 +24,7 @@ $SED_INPLACE 's/"version":.*/"version":"1.20-dev"/' static/latest-swagger.json for file in `find ./docs/ -name "*.md"`; do # hide hugo toc $SED_INPLACE 's/{{< toc >}}//' $file + $SED_INPLACE 's/dl.gitea.com\/gitea\/{{< version >}}/dl.gitea.com\/gitea\/main/g' $file $SED_INPLACE 's/{{< version >}}/main-nightly/g' $file $SED_INPLACE 's/{{< relref "doc\///g' $file $SED_INPLACE 's/.en-us.md/.md/g' $file