From d3323cee1cec09c5e42b438582c50eb5429df954 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 6 Jun 2023 20:31:45 +0000 Subject: [PATCH] fix: sed incantation for dl.gitea.com main-nightly (#26) Signed-off-by: jolheiser Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/26 Reviewed-by: techknowlogick Co-authored-by: jolheiser Co-committed-by: jolheiser --- loop_docs-zh-cn.sh | 3 ++- loop_docs.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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