remove redundant filtering in side bar

This commit is contained in:
Richard van der Hoff 2022-11-02 22:58:20 +00:00
parent 56b75c809e
commit 55ecab244a

View file

@ -6,8 +6,6 @@
* include `div#toc` for the ToC * include `div#toc` for the ToC
* start the sidebar at the root (homepage) since for us that is the Matrix * start the sidebar at the root (homepage) since for us that is the Matrix
overview page overview page
* omit module pages, which we don't want to be directly accessible
(we only use them as raw material for the client-server spec)
*/}} */}}
@ -41,7 +39,6 @@
<li class="td-sidebar-nav__section-title"> <li class="td-sidebar-nav__section-title">
<a href="{{ $s.RelPermalink }}" class="align-left pl-0 pr-2{{ if not $show }} collapsed{{ end }}{{ if $active}} active{{ end }} td-sidebar-link td-sidebar-link__section indent-{{$indent}}">{{ $s.LinkTitle }}</a> <a href="{{ $s.RelPermalink }}" class="align-left pl-0 pr-2{{ if not $show }} collapsed{{ end }}{{ if $active}} active{{ end }} td-sidebar-link td-sidebar-link__section indent-{{$indent}}">{{ $s.LinkTitle }}</a>
{{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }} {{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }}
{{ $pages = where $pages "Type" "!=" "module"}}
{{ $pages := $pages | first 50 }} {{ $pages := $pages | first 50 }}
{{ if gt (len $pages) 0 }} {{ if gt (len $pages) 0 }}
<ul> <ul>