Skip to content

Commit 1342d03

Browse files
committed
Fixes #408 and also #178 - but afraid it will cause the same issue as #178 in deploy, needs more testing
1 parent 518ff45 commit 1342d03

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/templates/mixins/render-page-tree.pug

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
mixin renderPage(entry)
2+
- var entryPath = entry.path.replace('.pug', '');
3+
- var isActive = false
4+
if pathname === entryPath || (entryPath && pathname.includes(entryPath))
5+
- basePage = entry
6+
if pathname === entryPath || (entryPath && pathname === entryPath)
7+
- isActive = true
28
if !entry.path.includes('--')
3-
- var entryPath = entry.path.replace('.pug', '');
4-
- var isActive = false;
5-
if pathname === entryPath || (entryPath && pathname.includes(entryPath)) || (pathname === '' && entryPath === 'index')
6-
- basePage = entry;
7-
- isActive = true;
89
li.br-tree-dir
910
a(href=entry.href, class=isActive ? 'br-bordered-list__link--active' : null)
1011
= entry.name

0 commit comments

Comments
 (0)