mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 03:35:36 +00:00
Docs: update theme (#368)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -33,4 +33,6 @@ dist/
|
||||
|
||||
# hugo
|
||||
**/.hugo_build.lock
|
||||
docSite/public/
|
||||
docSite/public/
|
||||
docSite/resources/_gen/
|
||||
docSite/.vercel
|
@@ -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/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -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
|
||||
)
|
||||
|
@@ -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=
|
||||
|
@@ -18,6 +18,9 @@ defaultContentLanguage = 'zh-cn'
|
||||
weight = 10
|
||||
disabled = true
|
||||
|
||||
[build]
|
||||
noJSConfigInAssets = true
|
||||
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
|
@@ -11,8 +11,12 @@
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
{{ $mermaid := resources.Get (printf "%s/%s" ($.Scratch.Get "pathName") "js/mermaid.js") }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $mermaid = $mermaid | minify | fingerprint "sha384" }}
|
||||
{{ end }}
|
||||
<script src="{{ $mermaid.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $mermaid.Data.Integrity }}"{{ end }}></script>
|
||||
<script>
|
||||
const config = {
|
||||
startOnLoad:true,
|
||||
logLevel: "error",
|
||||
|
@@ -30,6 +30,8 @@
|
||||
<meta name="Version" content="v0.1.0" />
|
||||
<!-- favicon -->
|
||||
{{ block "favicon" . }}{{ partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/favicon.html") . }}{{ end }}
|
||||
{{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/opengraph") . }}
|
||||
{{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/twitter_cards") . }}
|
||||
<!-- Dark Mode -->
|
||||
{{ if eq .Site.Params.docs.darkMode true -}}
|
||||
{{ $darkModeInit := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/darkmode-init.js") | js.Build | minify -}}
|
||||
|
@@ -42,7 +42,45 @@
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ if .IsSection }}
|
||||
<li class="sidebar-dropdown nested {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }} {{ if $active }}current active{{ end }}">
|
||||
<button class="btn">
|
||||
{{ if eq .Site.Params.docs.sidebarIcons true -}}
|
||||
<!-- <span class="material-icons me-2">{{- .Params.icon }}</span> -->
|
||||
{{ end }}
|
||||
{{- .Title }}
|
||||
</button>
|
||||
<div class="sidebar-submenu {{ if $active }}d-block{{ end }}">
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
{{ if .IsSection }}
|
||||
<li class="sidebar-dropdown nested {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }} {{ if $active }}current active{{ end }}">
|
||||
<button class="btn">
|
||||
{{ if eq .Site.Params.docs.sidebarIcons true -}}
|
||||
<!-- <span class="material-icons me-2">{{- .Params.icon }}</span> -->
|
||||
{{ end }}
|
||||
{{- .Title }}
|
||||
</button>
|
||||
<div class="sidebar-submenu {{ if $active }}d-block{{ end }}">
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user