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" 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 }}