Change:
</div> {{ end }} --> <!-- {{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type "docs")) .Site.Home .FirstSection }} --> <del> {{ $ulNr := 0 }} {{ $ulShow := cond (isset .Site.Params.ui "ul_show") .Site.Params.ui.ul_show 1 }} {{ $sidebarMenuTruncate := cond (isset .Site.Params.ui "sidebar_menu_truncate") .Site.Params.ui.sidebar_menu_truncate 50 }} {{ $currentLang := .Site.Language }} </del> <ins> {{ $ulNr := 0 -}} {{ $ulShow := cond (isset .Site.Params.ui "ul_show") .Site.Params.ui.ul_show 1 -}} {{ $sidebarMenuTruncate := cond (isset .Site.Params.ui "sidebar_menu_truncate") .Site.Params.ui.sidebar_menu_truncate 50 -}} {{ $currentLang := .Site.Language -}} </ins> <ul class="td-sidebar-nav__section pr-md-3 ul-{{ $ulNr }}"> {{ template "section-tree-nav-section" (dict "page" . "section" .FirstSection "shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" (add $ulShow 1) "currentLang" $currentLang)  }} </ul> </nav> </div> <del> {{ define "section-tree-nav-section" }} {{ $s := .section }} {{ $p := .page }} {{ $shouldDelayActive := .shouldDelayActive }} {{ $sidebarMenuTruncate := .sidebarMenuTruncate }} {{ $treeRoot := cond (eq .ulNr 0) true false }} {{ $ulNr := .ulNr }} {{ $ulShow := .ulShow }} {{ $active := and (not $shouldDelayActive) (eq $s $p) }} {{ $activePath := and (not $shouldDelayActive) ($p.IsDescendant $s) }} {{ $show := cond (or (lt $ulNr $ulShow) $activePath (and (not $shouldDelayActive) (eq $s.Parent $p.Parent)) (and (not $shouldDelayActive) (eq $s.Parent $p)) (and (not $shouldDelayActive) ($p.IsDescendant $s.Parent))) true false }} {{ $mid := printf "m-%s" ($s.RelPermalink | anchorize) }} {{ $pages_tmp := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }} {{ $pages := $pages_tmp | first $sidebarMenuTruncate }} {{ $withChild := gt (len $pages) 0 }} {{ $manualLink := cond (isset $s.Params "manuallink") $s.Params.manualLink ( cond (isset $s.Params "manuallinkrelref") (relref $s $s.Params.manualLinkRelref) $s.RelPermalink) }} {{ $manualLinkTitle := cond (isset $s.Params "manuallinktitle") $s.Params.manualLinkTitle $s.Title }} </del> <ins> {{ define "section-tree-nav-section" -}} {{ $s := .section -}} {{ $p := .page -}} {{ $shouldDelayActive := .shouldDelayActive -}} {{ $sidebarMenuTruncate := .sidebarMenuTruncate -}} {{ $treeRoot := cond (eq .ulNr 0) true false -}} {{ $ulNr := .ulNr -}} {{ $ulShow := .ulShow -}} {{ $active := and (not $shouldDelayActive) (eq $s $p) -}} {{ $activePath := and (not $shouldDelayActive) ($p.IsDescendant $s) -}} {{ $show := cond (or (lt $ulNr $ulShow) $activePath (and (not $shouldDelayActive) (eq $s.Parent $p.Parent)) (and (not $shouldDelayActive) (eq $s.Parent $p)) (and (not $shouldDelayActive) ($p.IsDescendant $s.Parent))) true false -}} {{ $mid := printf "m-%s" ($s.RelPermalink | anchorize) -}} {{ $pages_tmp := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true -}} {{ $pages := $pages_tmp | first $sidebarMenuTruncate -}} {{ $withChild := gt (len $pages) 0 -}} {{ $manualLink := cond (isset $s.Params "manuallink") $s.Params.manualLink ( cond (isset $s.Params "manuallinkrelref") (relref $s $s.Params.manualLinkRelref) $s.RelPermalink) -}} {{ $manualLinkTitle := cond (isset $s.Params "manuallinktitle") $s.Params.manualLinkTitle $s.Title -}} </ins> <li class="td-sidebar-nav__section-title td-sidebar-nav__section{{ if $withChild }} with-child{{ else }} without-child{{ end }}{{ if $activePath }} active-path{{ end }}{{ if (not (or $show $p.Site.Params.ui.sidebar_menu_foldable )) }} collapse{{ end }}" id="{{ $mid }}-li"> <del> {{ if (and $p.Site.Params.ui.sidebar_menu_foldable (ge $ulNr 1)) }} </del> <ins> {{ if (and $p.Site.Params.ui.sidebar_menu_foldable (ge $ulNr 1)) -}} </ins> <input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ end }}/> <label for="{{ $mid }}-check"><a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="align-left pl-0 {{ if $active}} active{{ end }} td-sidebar-link{{ if $s.IsPage }} td-sidebar-link__page{{ else }} td-sidebar-link__section{{ end }}{{ if $treeRoot }} tree-root{{ end }}" id="{{ $mid }}">{{ with $s.Params.Icon}}<i class="{{ . }}"></i>{{ end }}<span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}">{{ $s.LinkTitle }}</span></a></label> <del> {{ else }} </del> <ins> {{ else -}} </ins> {{ if not $treeRoot }} <a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="align-left pl-0{{ if $active}} active{{ end }} td-sidebar-link{{ if $s.IsPage }} td-sidebar-link__page{{ else }} td-sidebar-link__section{{ end }}" id="{{ $mid }}">{{ with $s.Params.Icon}}<i class="{{ . }}"></i>{{ end }}<span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}">{{ $s.LinkTitle }}</span></a> <del> {{ end }} {{ end }} {{if $withChild }} {{ $ulNr := add $ulNr 1 }} </del> <ins> {{ end -}} {{ end -}} {{ if $withChild -}} {{ $ulNr := add $ulNr 1 -}} </ins> <ul class="ul-{{ $ulNr }}{{ if (gt $ulNr 1)}} foldable{{end}}"> <del> {{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }} {{ with site.Params.language_alternatives }} </del> <ins> {{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true -}} {{ with site.Params.language_alternatives -}} </ins> {{ range . }} <del> {{ with (where $.section.Translations ".Lang" . ) }} {{ $p := index . 0 }} {{ $pages =  $pages | lang.Merge (union $p.Pages $p.Sections) }} {{ end }} {{ end }} {{ end }} {{ $pages := $pages | first 50 }} {{ range $pages }} {{ if (not (and (eq $s $p.Site.Home) (eq .Params.toc_root true)) ) }} {{ $mid := printf "m-%s" (.RelPermalink | anchorize) }} {{ $active := eq . $p }} {{ $isForeignLanguage := (ne (string .Lang) (string $.currentLang)) }} {{ if (and $isForeignLanguage  ($p.IsDescendant $s)) }} </del> <ins> {{ with (where $.section.Translations ".Lang" . ) -}} {{ $p := index . 0 -}} {{ $pages =  $pages | lang.Merge (union $p.Pages $p.Sections) -}} {{ end -}} {{ end -}} {{ end -}} {{ $pages := $pages | first 50 -}} {{ range $pages -}} {{ if (not (and (eq $s $p.Site.Home) (eq .Params.toc_root true)) ) -}} {{ $mid := printf "m-%s" (.RelPermalink | anchorize) -}} {{ $active := eq . $p -}} {{ $isForeignLanguage := (ne (string .Lang) (string $.currentLang)) -}} {{ if (and $isForeignLanguage  ($p.IsDescendant $s)) -}} </ins> <a class="td-sidebar-link td-sidebar-link__page {{ if and (not $shouldDelayActive) $active }} active{{ end }}" id="{{ $mid }}" {{ if $isForeignLanguage }}target="_blank"{{ end }}  href="{{ .RelPermalink }}"> <del> {{ .LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .Lang | upper }})</small>{{ end }} </del> <ins> {{ .LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .Lang | upper }})</small>{{ end -}} </ins> </a> <del> {{ else }} </del> <ins> {{ else -}} </ins> {{ template "section-tree-nav-section" (dict "page" $p "section" . "currentLang" $.currentLang "shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" $ulShow) }} <del> {{ end }} {{ end }} {{ end }} </del> <ins> {{- end }} {{- end }} {{- end }} </ins> </ul> <del> {{ end }} </del> <ins> {{- end }} </ins> </li> <del> {{ end }} </del> <ins> {{- end }} </ins>

Discussion:
This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: I saw by accident very big page files on Kubernetes documentation. For example is lines long and the lines 286- are taken for the sidebar menu containing a lot of whitespace (do right-mouse and "view page source"). Proposed Solution: I reported the issue already with Docsy: and proposed a pull request. But this will not be enough. Somebody has to update too. Page to Update: <!--Optional Information (remove the comment tags around information you would like to include)--<!--Kubernetes Version:--<!--Additional Information:--
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/assign
The hugo Docsy theme side issue is resolved and closed: When will somebody review and implement pull request ? You can do this separate from a Docsy theme update at It is only about (huge) whitespace reduction, not a functional change. But k8s website users will benefit in user experience.