Fix buggy match for top of documentation
The match was against the page title, which isn't as stable as the filename of the page. Switch to matching by filename.
This commit is contained in:
@@ -26,13 +26,13 @@
|
||||
{{ $show := or (eq $s $p.FirstSection) (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsDescendant $s)) }}
|
||||
{{ $sid := $s.RelPermalink | anchorize }}
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
{{ if (ne $s.File.Path "docs/_index.md") }}
|
||||
<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">
|
||||
{{ if not (eq $s.LinkTitle "Documentation") }}
|
||||
{{ $s.LinkTitle }}
|
||||
{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<ul>
|
||||
<li class="collapse {{ if $show }}show{{ end }}" id="{{ $sid }}">
|
||||
{{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }}
|
||||
|
||||
Reference in New Issue
Block a user