From 7f1fecb84e56acf26324c5d4c1530fd9a366f235 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Wed, 4 Oct 2023 22:25:07 +0800 Subject: [PATCH] Docs: update theme (#368) Signed-off-by: Carson Yang --- .gitignore | 4 ++- docSite/assets/jsconfig.json | 11 ------ docSite/go.mod | 2 +- docSite/go.sum | 2 ++ docSite/hugo.toml | 3 ++ docSite/layouts/docs/single.html | 8 +++-- docSite/layouts/partials/docs/head.html | 2 ++ docSite/layouts/partials/docs/sidebar.html | 40 +++++++++++++++++++++- 8 files changed, 56 insertions(+), 16 deletions(-) delete mode 100644 docSite/assets/jsconfig.json diff --git a/.gitignore b/.gitignore index 0684a839a5..e5ba8debf9 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,6 @@ dist/ # hugo **/.hugo_build.lock -docSite/public/ \ No newline at end of file +docSite/public/ +docSite/resources/_gen/ +docSite/.vercel \ No newline at end of file diff --git a/docSite/assets/jsconfig.json b/docSite/assets/jsconfig.json deleted file mode 100644 index 034343a298..0000000000 --- a/docSite/assets/jsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "*": [ - "../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*", - "../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*" - ] - } - } -} \ No newline at end of file diff --git a/docSite/go.mod b/docSite/go.mod index f8333d80bf..6119b4199a 100644 --- a/docSite/go.mod +++ b/docSite/go.mod @@ -3,6 +3,6 @@ module fastgpt-docs go 1.21 require ( - github.com/colinwilson/lotusdocs v0.0.0-20230919015602-a9717caaab14 // indirect + github.com/colinwilson/lotusdocs v0.1.0 // indirect github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20003 // indirect ) diff --git a/docSite/go.sum b/docSite/go.sum index 611352d700..1541bb6f52 100644 --- a/docSite/go.sum +++ b/docSite/go.sum @@ -6,6 +6,8 @@ github.com/colinwilson/lotusdocs v0.0.0-20230821033552-c5bcbdd9df80 h1:jKZF8sqr/ github.com/colinwilson/lotusdocs v0.0.0-20230821033552-c5bcbdd9df80/go.mod h1:9zu2REJDi+zdPRcR5/bRYSUR7gkNF4NQLvV38SEoCP8= github.com/colinwilson/lotusdocs v0.0.0-20230919015602-a9717caaab14 h1:ORzVQia2njOTCs/5cTQZW0Y+YRZlupgwtGx3umABTcc= github.com/colinwilson/lotusdocs v0.0.0-20230919015602-a9717caaab14/go.mod h1:9zu2REJDi+zdPRcR5/bRYSUR7gkNF4NQLvV38SEoCP8= +github.com/colinwilson/lotusdocs v0.1.0 h1:oTC8pAYQp9XDNaUwE4SEY+id3ByNELxIIFrktYEGxYA= +github.com/colinwilson/lotusdocs v0.1.0/go.mod h1:9zu2REJDi+zdPRcR5/bRYSUR7gkNF4NQLvV38SEoCP8= github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20003 h1:pt/JGVD5YYRsVVijOHPZI6YKTUvbR4e0hgV9B0S6rbI= github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20003/go.mod h1:mvM05r93HiefwoaxQTaYiJxtJAhTebwQtU1Xh/J+Okk= github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI= diff --git a/docSite/hugo.toml b/docSite/hugo.toml index 7ff75b58c7..fe8a3c67d4 100644 --- a/docSite/hugo.toml +++ b/docSite/hugo.toml @@ -18,6 +18,9 @@ defaultContentLanguage = 'zh-cn' weight = 10 disabled = true +[build] + noJSConfigInAssets = true + [module] [module.hugoVersion] extended = true diff --git a/docSite/layouts/docs/single.html b/docSite/layouts/docs/single.html index 54cbf81da4..0ea8deed2d 100644 --- a/docSite/layouts/docs/single.html +++ b/docSite/layouts/docs/single.html @@ -11,8 +11,12 @@ {{ end -}} {{ if .Page.Store.Get "hasMermaid" }} - +