Skip to content

Commit

Permalink
Update workflow to change baseurl for cn site (#2081)
Browse files Browse the repository at this point in the history
* Docs: fix gitinfo

Signed-off-by: Carson Yang <[email protected]>

* Update workflow to change baseurl for cn site

Signed-off-by: Carson Yang <[email protected]>

---------

Signed-off-by: Carson Yang <[email protected]>
  • Loading branch information
yangchuansheng authored Jul 18, 2024
1 parent 6390d64 commit 1eedb9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/docs-deploy-kubeconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docSite/layouts/partials/docs/gitinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{ end }}

<!-- change -->
{{ $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 }}

Expand Down

0 comments on commit 1eedb9c

Please sign in to comment.