Skip to content

Commit 63cbc7c

Browse files
author
Tim Bannister
committed
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.
1 parent c7ee5d7 commit 63cbc7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/partials/sidebar-tree.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
{{ $show := or (eq $s $p.FirstSection) (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsDescendant $s)) }}
2727
{{ $sid := $s.RelPermalink | anchorize }}
2828
<ul class="td-sidebar-nav__section pr-md-3">
29+
{{ if (ne $s.File.Path "docs/_index.md") }}
2930
<li class="td-sidebar-nav__section-title">
3031
<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">
31-
{{ if not (eq $s.LinkTitle "Documentation") }}
3232
{{ $s.LinkTitle }}
33-
{{ end }}
3433
</a>
3534
</li>
35+
{{ end }}
3636
<ul>
3737
<li class="collapse {{ if $show }}show{{ end }}" id="{{ $sid }}">
3838
{{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }}

0 commit comments

Comments
 (0)