Merge pull request #3282 from fuchunlan/disable-doc-list

fix: Disable doc list url
This commit is contained in:
yonghongshi 2025-07-31 16:16:24 +08:00 committed by GitHub
commit a187bddd58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 12 deletions

View File

@ -2,10 +2,6 @@
title: "Documentation"
css: "scss/docs.scss"
isDocsRoot: true
_build:
render: never
list: never
publishResources: false
LinkTitle: "文档"

View File

@ -2,10 +2,6 @@
title: "Documentation"
css: "scss/docs.scss"
isDocsRoot: true
_build:
render: never
list: never
publishResources: false
LinkTitle: "文档"

View File

@ -3,10 +3,6 @@ title: 文档中心
css: scss/docs.scss
isDocsRoot: true
LinkTitle: 文档
_build:
render: never
list: never
publishResources: false
section1:
title: KubeSphere

View File

@ -1,5 +1,16 @@
{{ define "main" }}
{{ $disabledVersions := slice "v3.3" "v3.4" "v4.1" }}
{{ $currentVersion := index (strings.FindRE `v[0-9]+\.[0-9]+` .RelPermalink) 0 }}
{{ if in $disabledVersions $currentVersion }}
<script>window.location.replace('/404.html');</script>
<noscript>
<meta http-equiv="refresh" content="0; url=/404.html">
</noscript>
{{ return }}
{{ end }}
{{ with .Params.section1 }}
<section class='section-1 bg-cover' style='background-image: url("{{ .image }}");'>
<div class="title-div common-layout">

View File

@ -1,3 +1,18 @@
{{ $disabledVersions := slice "v3.3" "v3.4" "v4.1" }}
{{ $currentVersion := index (strings.FindRE `v[0-9]+\.[0-9]+` .Page.RelPermalink) 0 }}
{{ if and $currentVersion (in $disabledVersions $currentVersion) }}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=/404.html">
<script>window.location = '/404.html';</script>
</head>
<body></body>
</html>
{{ return }}
{{ end }}
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>