This is an automated email from the ASF dual-hosted git repository.

adutra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 59a7f010b Add "latest" permalink and navigation sidebar to 
documentation pages (#3876)
59a7f010b is described below

commit 59a7f010b9780087ff6ab79af2a3c3c16a627dff
Author: Alexandre Dutra <[email protected]>
AuthorDate: Sat Feb 28 15:12:18 2026 +0100

    Add "latest" permalink and navigation sidebar to documentation pages (#3876)
    
    Summary:
    
    - Introduce a "permalink" that points to the latest stable release docs: 
`<root>/releases/latest/`. This is achieved using a custom layout that 
generates an HTML redirect.
    - Introduce a "landing page" for Documentation (it simply lists the 
available docs). It sits at `/docs/`.
    - Improve the Documentation sidebar by displaying unreleased, active, and 
EOL release documentations.
    - Improve the Documentation breadcrumbs by making them all start with a 
Documentation step, that links to the Documentation lading page.
---
 build.gradle.kts                                   |  1 +
 site/README.md                                     | 10 ++-
 site/bin/exclude_version_from_search.sh            |  2 +-
 site/content/docs/_index.md                        | 53 +++++++++++++
 site/hugo.yaml                                     | 15 +++-
 site/layouts/_default/redirect.html                | 14 ++++
 site/layouts/docs/baseof.html                      |  7 +-
 site/layouts/partials/breadcrumb.html              | 92 ++++++++++++++++++++++
 site/layouts/partials/docs-link.html               | 30 +++++++
 site/layouts/partials/releasePages.html            | 29 ++++---
 ...r-releases-tree.html => sidebar-docs-tree.html} | 73 +++++++++++++----
 .../{sidebar-releases.html => sidebar-docs.html}   |  4 +-
 site/layouts/releases/baseof.html                  |  2 +-
 site/layouts/shortcodes/docs-link.html             | 20 +++++
 14 files changed, 314 insertions(+), 38 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index cf1b2b902..d45584087 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -79,6 +79,7 @@ tasks.named<RatTask>("rat").configure {
 
   // Hugo render hook - HTML comments would appear in rendered output
   excludes.add("site/layouts/_default/_markup/render-heading.html")
+  excludes.add("site/layouts/_default/redirect.html")
 
   // Files copied from OpenAPI Generator (ASLv2 licensed) don't have header
   excludes.add("server-templates/*.mustache")
diff --git a/site/README.md b/site/README.md
index b5d237ee7..7af6f23ae 100644
--- a/site/README.md
+++ b/site/README.md
@@ -139,9 +139,13 @@ in the main source tree:
        `exclude_search: false` changed to `exclude_search: true`.
 6. When publishing a new release for an older major/minor version:
     1. The new release's `_index.md` would be generated with `exclude_search: 
true`
-7. Changes to the site added and committed to Git
-8. Changes pushed to GitHub - both the `main` and the `versioned-docs` folder
-9. The last step triggers the job to publish the web site
+7. Update the "latest" redirect to point to the new release:
+    1. Edit `/releases/latest/index.md` in the `versioned-docs` branch (i.e., 
`site/content/releases/latest/index.md` if using the Git worktree)
+    2. Update the `redirect_to` parameter in the front matter to point to the 
new release (e.g., change `redirect_to: '/releases/1.3.0/'` to `redirect_to: 
'/releases/1.4.0/'`)
+8. Update `/docs/_index.md` to link to the new release's documentation.
+9. Changes to the site added and committed to Git
+10. Changes pushed to GitHub - both the `main` and the `versioned-docs` folder
+11. The last step triggers the job to publish the web site
 
 ## Website Publishing (Production)
 
diff --git a/site/bin/exclude_version_from_search.sh 
b/site/bin/exclude_version_from_search.sh
index 0f31fb42d..aa5fd09f0 100755
--- a/site/bin/exclude_version_from_search.sh
+++ b/site/bin/exclude_version_from_search.sh
@@ -24,7 +24,7 @@ set -o pipefail
 cd "$(dirname "$0")/.."
 
 if [[ ! -d content/releases ]] ; then
-  echo "Directory content/releases does not exists, run 
bin/checkout-releases.sh first."
+  echo "Directory content/releases does not exist, run 
bin/checkout-releases.sh first."
   exit 1
 fi
 
diff --git a/site/content/docs/_index.md b/site/content/docs/_index.md
new file mode 100644
index 000000000..a1f18413b
--- /dev/null
+++ b/site/content/docs/_index.md
@@ -0,0 +1,53 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: 'Apache Polaris Documentation'
+linkTitle: 'Documentation'
+type: docs
+# Mark this as the documentation root - used by breadcrumb.html partial
+params:
+  docs_root: true
+---
+
+Welcome to the Apache Polaris documentation. Select a version below to get 
started.
+
+## In Development
+
+The latest unreleased documentation from the main branch:
+
+- {{< docs-link version="unreleased" >}} (Latest development version)
+
+## Released Versions
+
+### Active Releases
+
+These versions are currently supported:
+
+- {{< docs-link version="1.3.0" >}}
+- {{< docs-link version="1.2.0" >}}
+- {{< docs-link version="1.1.0" >}}
+
+### End-of-Life Releases
+
+These versions are no longer supported:
+
+- {{< docs-link version="1.0.1" >}}
+- {{< docs-link version="1.0.0" >}}
+- {{< docs-link version="0.9.0" >}}
+
diff --git a/site/hugo.yaml b/site/hugo.yaml
index d18284ff4..354beb316 100644
--- a/site/hugo.yaml
+++ b/site/hugo.yaml
@@ -65,12 +65,11 @@ params:
   # at the very right in the navbar.
   active_releases:
     # Mention all active releases here, in semver descending order
+    # EOL releases (0.9.0, 1.0.0, 1.0.1) should NOT be listed here!
+    # When changing this list, also modify /docs/_index.md.
     - "1.3.0"
     - "1.2.0"
     - "1.1.0"
-    - "1.0.1"
-    - "1.0.0"
-    - "0.9.0"
 
   ui:
     ul_show: 1
@@ -93,7 +92,7 @@ params:
 imaging:
   resampleFilter: "CatmullRom"
   quality: 75
-  anchor: "smart"
+  anchor: Smart
 
 menu:
   main:
@@ -102,10 +101,18 @@ menu:
       weight: 100
       params:
         orderby: weight.desc
+    - name: "Overview"
+      url: "/docs/"
+      parent: "doc"
+      weight: -100
     - name: "In Development"
       url: "/in-dev/unreleased/"
       parent: "doc"
       weight: 1
+    - name: "Latest"
+      url: "/releases/latest/"
+      parent: "doc"
+      weight: 2
     - name: "1.3.0"
       url: "/releases/1.3.0/"
       parent: "doc"
diff --git a/site/layouts/_default/redirect.html 
b/site/layouts/_default/redirect.html
new file mode 100644
index 000000000..41360279a
--- /dev/null
+++ b/site/layouts/_default/redirect.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="{{ site.Language.LanguageCode }}">
+  <head>
+    <title>{{ .Title }}</title>
+    <link rel="canonical" href="{{ .Params.redirect_to }}">
+    <meta name="robots" content="noindex">
+    <meta charset="utf-8">
+    <meta http-equiv="refresh" content="0; url={{ .Params.redirect_to }}">
+  </head>
+  <body>
+    <p>Redirecting to <a href="{{ .Params.redirect_to }}">{{ 
.Params.redirect_to }}</a>...</p>
+  </body>
+</html>
+
diff --git a/site/layouts/docs/baseof.html b/site/layouts/docs/baseof.html
index 8038f6df8..1833c4db0 100644
--- a/site/layouts/docs/baseof.html
+++ b/site/layouts/docs/baseof.html
@@ -14,7 +14,12 @@
       <div class="td-main">
         <div class="row flex-xl-nowrap">
           <aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
-            {{ partial "sidebar.html" . }}
+            {{/* Use the unified docs sidebar for /docs/, /in-dev/unreleased/ 
and /releases/ pages */}}
+            {{ if or (eq .RelPermalink "/docs/") (hasPrefix .RelPermalink 
"/in-dev/unreleased") (hasPrefix .RelPermalink "/releases/") }}
+              {{ partial "sidebar-docs.html" . }}
+            {{ else }}
+              {{ partial "sidebar.html" . }}
+            {{ end }}
           </aside>
           <!-- Polaris custom flag to include the _right_ side page TOC -->
           {{ if .Params.show_page_toc -}}
diff --git a/site/layouts/partials/breadcrumb.html 
b/site/layouts/partials/breadcrumb.html
new file mode 100644
index 000000000..067946e79
--- /dev/null
+++ b/site/layouts/partials/breadcrumb.html
@@ -0,0 +1,92 @@
+{{/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+Custom breadcrumb partial for Apache Polaris.
+For documentation pages (under /in-dev/unreleased/ or /releases/), 
+replaces the first breadcrumb with "Documentation" linking to /docs/.
+*/}}
+{{ $isSingle := true -}}
+{{ with .Parent -}}
+  {{ $isSingle = .IsHome -}}
+{{ end -}}
+
+{{/* Check if this is a documentation page */}}
+{{ $isDocsPage := or (hasPrefix .RelPermalink "/in-dev/unreleased") (hasPrefix 
.RelPermalink "/releases/") -}}
+{{ $docsPage := .Site.GetPage "/docs" -}}
+
+<nav aria-label="breadcrumb" class="td-breadcrumbs
+    {{- if $isSingle }} td-breadcrumbs__single {{- end }}">
+  <ol class="breadcrumb">
+    {{- if and $isDocsPage $docsPage }}
+      {{/* For documentation pages, start with "Documentation" breadcrumb */}}
+      <li class="breadcrumb-item">
+        <a href="{{ $docsPage.RelPermalink }}">{{ $docsPage.LinkTitle }}</a>
+      </li>
+      {{/* Then render the rest of the breadcrumb chain, skipping /in-dev/ and 
/releases/ */}}
+      {{- template "docs-breadcrumbnav" (dict "p1" . "p2" . "site" .Site) }}
+    {{- else }}
+      {{/* For non-documentation pages, use standard breadcrumb */}}
+      {{- template "breadcrumbnav" (dict "p1" . "p2" .) }}
+    {{- end }}
+  </ol>
+</nav>
+
+{{/* Standard breadcrumb navigation (for non-docs pages) */}}
+{{- define "breadcrumbnav" -}}
+  {{ if .p1.Parent -}}
+    {{ if not .p1.Parent.IsHome -}}
+      {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 )  -}}
+    {{ end -}}
+  {{ else if not .p1.IsHome -}}
+    {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 )  -}}
+  {{ end -}}
+  {{ $isActive :=  eq .p1 .p2 }}
+  <li class="breadcrumb-item{{ if $isActive }} active{{ end }}"
+      {{- if $isActive }} aria-current="page"{{ end }}>
+    {{ if $isActive -}}
+      {{ .p1.LinkTitle -}}
+    {{ else -}}
+      <a href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a>
+    {{- end -}}
+  </li>
+{{- end -}}
+
+{{/* Documentation breadcrumb navigation - skips /in-dev/ and /releases/ 
parent pages */}}
+{{- define "docs-breadcrumbnav" -}}
+  {{/* Stop recursion at /in-dev/ or /releases/ (we already added 
Documentation) */}}
+  {{ $skipParent := or (eq .p1.RelPermalink "/in-dev/") (eq .p1.RelPermalink 
"/releases/") -}}
+  {{ if and .p1.Parent (not $skipParent) -}}
+    {{ $parentSkip := or (eq .p1.Parent.RelPermalink "/in-dev/") (eq 
.p1.Parent.RelPermalink "/releases/") -}}
+    {{ if and (not .p1.Parent.IsHome) (not $parentSkip) -}}
+      {{ template "docs-breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 "site" 
.site)  -}}
+    {{ end -}}
+  {{ end -}}
+  {{/* Don't render the /in-dev/ or /releases/ page itself */}}
+  {{ if not $skipParent -}}
+    {{ $isActive := eq .p1 .p2 }}
+    <li class="breadcrumb-item{{ if $isActive }} active{{ end }}"
+        {{- if $isActive }} aria-current="page"{{ end }}>
+      {{ if $isActive -}}
+        {{ .p1.LinkTitle -}}
+      {{ else -}}
+        <a href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a>
+      {{- end -}}
+    </li>
+  {{- end -}}
+{{- end -}}
+
diff --git a/site/layouts/partials/docs-link.html 
b/site/layouts/partials/docs-link.html
new file mode 100644
index 000000000..7136948a1
--- /dev/null
+++ b/site/layouts/partials/docs-link.html
@@ -0,0 +1,30 @@
+{{/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/}}
+{{- $version := .Get "version" -}}
+{{- $path := "" -}}
+{{- $link := "" -}}
+{{- if eq $version "unreleased" -}}
+  {{- $path = "/in-dev/unreleased/" -}}
+  {{- $link = "Unreleased" -}}
+{{- else -}}
+  {{- $path = printf "/releases/%s/" $version -}}
+  {{- $link = $version -}}
+{{- end -}}
+<a href="{{ $path }}">{{ $link }}</a>
+
diff --git a/site/layouts/partials/releasePages.html 
b/site/layouts/partials/releasePages.html
index cef090859..fd81468a7 100644
--- a/site/layouts/partials/releasePages.html
+++ b/site/layouts/partials/releasePages.html
@@ -21,25 +21,32 @@ under the License.
 {{ $releasesRootBy := $s.Pages.ByParam "all_releases_root" -}}
 {{ $activeReleasePages := slice -}}
 {{ $eolReleasePages := slice -}}
+{{ $unreleasedPage := false -}}
+
+{{/* Find the "In Development" / unreleased page */}}
+{{ $inDevPage := $s.GetPage "/in-dev/unreleased" -}}
+{{ if $inDevPage -}}
+  {{ $unreleasedPage = $inDevPage -}}
+{{ end -}}
 
 {{ with $releasesRootBy -}}
   {{ $releasesRootPage := index . 0 -}}
   {{ if eq $releasesRootPage.Params.all_releases_root true }}
-    {{ $sortedVersions := partial "versions-sorted.html" (dict "site" $s 
"onlyActive" false) -}}
     {{ $activeReleases := $s.Params.active_releases }}
 
-    {{ $pagesByVersion := $releasesRootPage.Pages.GroupByParam 
"release_version" -}}
-    {{ range $sortedVersions -}}
-      {{ $version := . -}}
-      {{ $versionPages := where $pagesByVersion "Key" $version -}}
-      {{ $versionPage := index ((index $versionPages 0).Pages) 0 }}
-      {{ if in $activeReleases $version -}}
-        {{ $activeReleasePages = $activeReleasePages | append $versionPage }}
-      {{ else -}}
-        {{ $eolReleasePages = $eolReleasePages | append $versionPage }}
+    {{/* Iterate over release pages sorted by weight descending (higher weight 
= more recent) */}}
+    {{ range $releasesRootPage.Pages.ByWeight.Reverse -}}
+      {{ $versionPage := . -}}
+      {{ $version := $versionPage.Params.release_version -}}
+      {{ if $version -}}
+        {{ if in $activeReleases $version -}}
+          {{ $activeReleasePages = $activeReleasePages | append $versionPage }}
+        {{ else -}}
+          {{ $eolReleasePages = $eolReleasePages | append $versionPage }}
+        {{ end -}}
       {{ end -}}
     {{ end -}}
   {{ end -}}
 {{ end -}}
 
-{{ return (dict "active" $activeReleasePages "eol" $eolReleasePages) }}
\ No newline at end of file
+{{ return (dict "unreleased" $unreleasedPage "active" $activeReleasePages 
"eol" $eolReleasePages) }}
\ No newline at end of file
diff --git a/site/layouts/partials/sidebar-releases-tree.html 
b/site/layouts/partials/sidebar-docs-tree.html
similarity index 62%
rename from site/layouts/partials/sidebar-releases-tree.html
rename to site/layouts/partials/sidebar-docs-tree.html
index 8e478a823..bbbbf083a 100644
--- a/site/layouts/partials/sidebar-releases-tree.html
+++ b/site/layouts/partials/sidebar-docs-tree.html
@@ -46,33 +46,76 @@ under the License.
       {{ partial "navbar-lang-selector.html" . }}
     </div>
     {{ end -}}
-    {{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type 
"docs")) .Site.Home .FirstSection -}}
     {{ $ulNr := 0 -}}
     {{ $ulShow := .Site.Params.ui.ul_show | default 1 -}}
     {{ $sidebarMenuTruncate := .Site.Params.ui.sidebar_menu_truncate | default 
100 -}}
+    {{ $docsPage := .Site.GetPage "/docs" -}}
+    {{ $page := . }}
+    {{/* Check if current page is under /in-dev/unreleased/ or /releases/ */}}
+    {{ $activePath := or (hasPrefix $page.RelPermalink "/in-dev/unreleased") 
(hasPrefix $page.RelPermalink "/releases/") -}}
     <ul class="td-sidebar-nav__section pe-md-3 ul-{{ $ulNr }}">
-      {{ $page := . }}
-      {{ with partial "releasePages.html" (dict "site" .Site) -}}
-        {{ with .active -}}
-          {{ template "releases-section-versions-nav-section" (dict "page" 
$page "section" $navRoot "shouldDelayActive" $shouldDelayActive 
"sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" (add $ulShow 
1) "sectionLinkTitle" "Active Releases" "pages" . ) }}
-        {{ end -}}
-        {{ with .eol -}}
-          {{ template "releases-section-versions-nav-section" (dict "page" 
$page "section" $navRoot "shouldDelayActive" $shouldDelayActive 
"sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" (add $ulShow 
1) "sectionLinkTitle" "EOL Releases" "pages" . ) }}
-        {{ end -}}
-      {{ end -}}
+      {{/* Documentation root item - clickable title linking to /docs/ */}}
+      <li class="td-sidebar-nav__section-title td-sidebar-nav__section 
with-child{{ if $activePath }} active-path{{ end }}" id="m-docs-li">
+        <a href="{{ $docsPage.RelPermalink }}" class="align-left ps-0 
td-sidebar-link td-sidebar-link__section tree-root" id="m-docs"><span 
class="">{{ $docsPage.LinkTitle }}</span></a>
+        <ul class="ul-1">
+          {{ with partial "releasePages.html" (dict "site" .Site) -}}
+            {{/* Render "Unreleased" as a direct expandable item */}}
+            {{ with .unreleased -}}
+              {{ $versionPage := . -}}
+              {{ $pages := where $versionPage.Pages.ByWeight 
".Params.toc_hide" "!=" true -}}
+              {{ template "releases-section-x-nav-section" (dict "page" $page 
"section" $versionPage "shouldDelayActive" $shouldDelayActive 
"sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" 1 "ulShow" $ulShow 
"pages_input" $pages "sectionLinkTitle" "Unreleased") }}
+            {{ end -}}
+            {{/* Render Active Releases - as an expandable category */}}
+            {{ with .active -}}
+              {{ template "releases-section-category-nav" (dict "page" $page 
"shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" 
$sidebarMenuTruncate "ulNr" 1 "ulShow" $ulShow "categoryTitle" "Active 
Releases" "versionPages" . ) }}
+            {{ end -}}
+            {{/* Render EOL Releases - as an expandable category */}}
+            {{ with .eol -}}
+              {{ template "releases-section-category-nav" (dict "page" $page 
"shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" 
$sidebarMenuTruncate "ulNr" 1 "ulShow" $ulShow "categoryTitle" "EOL Releases" 
"versionPages" . ) }}
+            {{ end -}}
+          {{ end -}}
+        </ul>
+      </li>
     </ul>
   </nav>
 </div>
-{{/* "outer" tree, starting with the releases pages */}}
-{{ define "releases-section-versions-nav-section" -}}
-{{ $s := .section -}}
+{{/* Template for rendering a category like "Active Releases" or "EOL 
Releases" */}}
+{{/* This renders a category header (no link) with version pages as children 
*/}}
+{{/* Optional: childLinkTitle - if provided and there's only one versionPage, 
use this as the link title */}}
+{{ define "releases-section-category-nav" -}}
 {{ $p := .page -}}
 {{ $shouldDelayActive := .shouldDelayActive -}}
 {{ $sidebarMenuTruncate := .sidebarMenuTruncate -}}
 {{ $ulNr := .ulNr -}}
 {{ $ulShow := .ulShow -}}
-{{ $pages := .pages -}}
-{{ template "releases-section-x-nav-section" (dict "page" $p "section" $s 
"shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" 
$sidebarMenuTruncate "ulNr" $ulNr "ulShow" $ulShow "sectionLinkTitle" 
.sectionLinkTitle "pages_input" $pages) }}
+{{ $categoryTitle := .categoryTitle -}}
+{{ $versionPages := .versionPages -}}
+{{ $childLinkTitle := .childLinkTitle -}}
+{{ $mid := printf "m-category-%s" ($categoryTitle | anchorize) -}}
+{{/* Check if current page is a descendant of any version in this category */}}
+{{ $activePath := false -}}
+{{ range $versionPages -}}
+  {{ if or (eq $p .) ($p.IsDescendant .) -}}
+    {{ $activePath = true -}}
+  {{ end -}}
+{{ end -}}
+<li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child{{ 
if $activePath }} active-path{{ end }}" id="{{ $mid }}-li">
+  {{ if $p.Site.Params.ui.sidebar_menu_foldable -}}
+  <input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ 
end }}/>
+  <label for="{{ $mid }}-check"><span class="align-left ps-0 td-sidebar-link 
td-sidebar-link__section">{{ $categoryTitle }}</span></label>
+  {{ else -}}
+  <span class="align-left ps-0 td-sidebar-link td-sidebar-link__section">{{ 
$categoryTitle }}</span>
+  {{ end -}}
+  <ul class="ul-{{ add $ulNr 1 }} foldable">
+    {{ range $versionPages -}}
+      {{ $versionPage := . -}}
+      {{ $pages := where $versionPage.Pages.ByWeight ".Params.toc_hide" "!=" 
true -}}
+      {{/* Use childLinkTitle if provided, otherwise use the version's 
release_version or LinkTitle */}}
+      {{ $versionLinkTitle := $childLinkTitle | default 
($versionPage.Params.release_version | default $versionPage.LinkTitle) -}}
+      {{ template "releases-section-x-nav-section" (dict "page" $p "section" 
$versionPage "shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" 
$sidebarMenuTruncate "ulNr" (add $ulNr 1) "ulShow" $ulShow "pages_input" $pages 
"sectionLinkTitle" $versionLinkTitle) }}
+    {{ end -}}
+  </ul>
+</li>
 {{- end -}}
 
 {{ define "releases-section-x-nav-section" -}}
diff --git a/site/layouts/partials/sidebar-releases.html 
b/site/layouts/partials/sidebar-docs.html
similarity index 93%
rename from site/layouts/partials/sidebar-releases.html
rename to site/layouts/partials/sidebar-docs.html
index 7ba8daaf4..c5adc7eb4 100644
--- a/site/layouts/partials/sidebar-releases.html
+++ b/site/layouts/partials/sidebar-docs.html
@@ -35,7 +35,7 @@ under the License.
     $("#td-sidebar-menu").toggleClass("d-none"); 
     });
   </script>
-  {{ partialCached "sidebar-releases-tree.html" . .FirstSection.RelPermalink }}
+  {{ partialCached "sidebar-docs-tree.html" . .FirstSection.RelPermalink }}
 {{ else -}}
-  {{ partial "sidebar-releases-tree.html" . }}
+  {{ partial "sidebar-docs-tree.html" . }}
 {{- end }}
\ No newline at end of file
diff --git a/site/layouts/releases/baseof.html 
b/site/layouts/releases/baseof.html
index 1fc3c131f..3e11d99c0 100644
--- a/site/layouts/releases/baseof.html
+++ b/site/layouts/releases/baseof.html
@@ -31,7 +31,7 @@
       <div class="td-main">
         <div class="row flex-xl-nowrap">
           <aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
-            {{ partial "sidebar-releases.html" . }}
+            {{ partial "sidebar-docs.html" . }}
           </aside>
           {{/* No right sidebar */}}
           <main class="col-12 col-md-9 col-xl-10 ps-md-5" role="main">
diff --git a/site/layouts/shortcodes/docs-link.html 
b/site/layouts/shortcodes/docs-link.html
new file mode 100644
index 000000000..2551cf558
--- /dev/null
+++ b/site/layouts/shortcodes/docs-link.html
@@ -0,0 +1,20 @@
+{{/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/}}
+{{- partial "docs-link.html" . -}}
+

Reply via email to