Merge pull request #2515 from weili520/docs_subpath

fix: support docs switch to the path as '/docs/v3.3'
This commit is contained in:
KubeSphere CI Bot 2022-06-23 17:43:30 +08:00 committed by GitHub
commit 6743b07e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,11 +25,14 @@
{{ if .IsDescendant (.GetPage "/docs") }}
<link rel="stylesheet" href="/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
{{ if not (eq . (.GetPage "/docs"))}}
{{ $style := resources.Get "scss/doc.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ end }}
<link rel="stylesheet" href="/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
{{ if not (eq . (.GetPage "/docs"))}}
{{ $folder := . }}
{{ if not $folder.Params.isDocsRoot }}
{{ $style := resources.Get "scss/doc.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ end }}
{{ end }}
{{ end }}
{{ if .IsDescendant (.GetPage "/learn") }}