From e4b0f816b0d1ed382863a0c6e6b1591d0ccc49e6 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Wed, 29 May 2024 16:35:36 +0800 Subject: [PATCH 1/2] Docs: fix gitinfo Signed-off-by: Carson Yang --- docSite/hugo.toml | 1 + docSite/layouts/partials/docs/gitinfo.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docSite/hugo.toml b/docSite/hugo.toml index 8330e985ad0..4b6c1d4c9a4 100644 --- a/docSite/hugo.toml +++ b/docSite/hugo.toml @@ -5,6 +5,7 @@ enableEmoji = true enableGitInfo = false # N.B. .GitInfo does not currently function with git submodule content directories defaultContentLanguage = 'zh-cn' +defaultContentLanguageInSubdir = false [languages] [languages.zh-cn] title = "FastGPT" diff --git a/docSite/layouts/partials/docs/gitinfo.html b/docSite/layouts/partials/docs/gitinfo.html index 15ed533a584..f45087ce688 100644 --- a/docSite/layouts/partials/docs/gitinfo.html +++ b/docSite/layouts/partials/docs/gitinfo.html @@ -15,7 +15,7 @@ {{ end }} -{{ $repoURL = $repoURL | append "docSite/content" .Site.LanguagePrefix $filePath }} +{{ $repoURL = $repoURL | append "docSite/content" .Site.Language.Lang $filePath }} {{ $repoURL = delimit $repoURL "/" }} {{ $editPageURL := replaceRE "(https?://)|(/)+" "$1$2" $repoURL }} From 4398b6297a01fd77f1c9c1e85fd3d1e23be7cbb1 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Thu, 18 Jul 2024 11:07:31 +0800 Subject: [PATCH 2/2] Update workflow to change baseurl for cn site Signed-off-by: Carson Yang --- .github/workflows/docs-deploy-kubeconfig.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs-deploy-kubeconfig.yml b/.github/workflows/docs-deploy-kubeconfig.yml index e38d53485f2..c6e4ba01f6b 100644 --- a/.github/workflows/docs-deploy-kubeconfig.yml +++ b/.github/workflows/docs-deploy-kubeconfig.yml @@ -16,6 +16,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Change baseURL + run: sed -i 's|^baseURL =.*|baseURL = "https://doc.fastgpt.cn"|g' ./docSite/hugo.toml + - name: Get current date and time id: datetime run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"