Skip to content

Commit e4c8a71

Browse files
authored
Merge pull request #286 from github/keep-hidden-items-hidden-in-sidebar-and-prev-next
keep hidden items hidden in sidebar and prev/next
2 parents 1006130 + 7e5cafd commit e4c8a71

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

docs/_includes/sidebar.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
<nav class="position-sticky top-100px">
33
<ol class="f3-light ml-4">
44
{% for item in sidebarItems %}
5-
{% unless item.hidden %}
65
<li class="py-1">
76
<a href="{{ site.baseurl }}{{ item.url }}">{{ item.title || item.name }}</a>
87
{% if item.subtitle %}
98
<span class="d-block text-gray-light f5">{{ item.subtitle }}</span>
109
{% endif %}
1110
</li>
12-
{% endunless %}
1311
{% endfor %}
1412
</ol>
1513
</nav>

docs/_layouts/guide.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
---
44

5-
{% assign sidebarItems = site.guide | sort: 'chapter' %}
5+
{% assign sidebarItems = site.guide | where_exp: "item", "item.hidden != true" | sort: 'chapter' %}
66

77
{% for item in sidebarItems %}
88
{% if item.title == page.title %}

0 commit comments

Comments
 (0)