File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{% for entry in include.entries %}
2- {% assign entry_active = include.my_entry | remove: '/' == entry.url | remove: '/' %}
2+
3+ {% assign my_entry_url = include.my_entry %}
4+ {% assign entry_url = entry.url %}
5+
6+ {% if my_entry_url %}
7+ {% if my_entry_url | slice: -1 == '/' %}
8+ {% assign my_entry_no_trailing = my_entry_url | slice: 0, my_entry_url.size | minus: 1 %}
9+ {% else %}
10+ {% assign my_entry_no_trailing = my_entry_url %}
11+ {% endif %}
12+ {% endif %}
13+
14+ {% if entry_url %}
15+ {% if entry_url | slice: -1 == '/' %}
16+ {% assign entry_no_trailing = entry_url | slice: 0, entry_url.size | minus: 1 %}
17+ {% else %}
18+ {% assign entry_no_trailing = entry_url %}
19+ {% endif %}
20+ {% endif %}
21+
22+ {% assign entry_active = my_entry_no_trailing == entry_no_trailing %}
323
424{% if entry.url != null %}
525< li >
Original file line number Diff line number Diff line change 11< ul class ="site-toc ">
22 {% for entry in include.entries %}
33
4- {% assign entry_active = include.my_entry | remove: '/' == entry.url | remove: '/' %}
4+ {% assign my_entry_url = include.my_entry %}
5+ {% assign entry_url = entry.url %}
6+
7+ {% if my_entry_url %}
8+ {% if my_entry_url | slice: -1 == '/' %}
9+ {% assign my_entry_no_trailing = my_entry_url | slice: 0, my_entry_url.size | minus: 1 %}
10+ {% else %}
11+ {% assign my_entry_no_trailing = my_entry_url %}
12+ {% endif %}
13+ {% endif %}
14+
15+ {% if entry_url %}
16+ {% if entry_url | slice: -1 == '/' %}
17+ {% assign entry_no_trailing = entry_url | slice: 0, entry_url.size | minus: 1 %}
18+ {% else %}
19+ {% assign entry_no_trailing = entry_url %}
20+ {% endif %}
21+ {% endif %}
22+
23+ {% assign entry_active = my_entry_no_trailing == entry_no_trailing %}
524
625 < li >
726 {% if entry.children %}
1736 {% endif %}
1837 {% endif %}
1938
20-
2139 {% comment %}
2240 Insert page-specific ToC here if this is the entry for this page
2341 {% endcomment %}
2442 {% if entry_active %}< div id ="page-toc " class ="page-toc "> </ div > {% endif %}
2543
26-
2744 {% if entry.children %}
2845 {% include toc_recursive_main.html entries=entry.children my_entry=include.my_entry path_to_root=include.path_to_root %}
2946 {% endif %}
You can’t perform that action at this time.
0 commit comments