We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ceac17 commit 1e3d49fCopy full SHA for 1e3d49f
src/_includes/nav.html
@@ -17,7 +17,19 @@
17
<ul class="navbar-nav me-auto mb-2 mb-lg-0 d-flex justify-content-end">
18
{% for nav_item in site.data.nav %}
19
<li class="nav-item">
20
- <a class="nav-link" href="{{ nav_item.path }}" {% if nav_item.target %} target="{{ nav_item.target }}" {% endif %}
+ {% assign current_path = page.url | remove:".html" %}
21
+ <a
22
+ class="nav-link{% if nav_item.path == current_path %} active"
23
+ aria-current="page{% endif %}"
24
+ href="{{ nav_item.path }}"
25
+ {%
26
+ if
27
+ nav_item.target
28
+ %}
29
+ target="{{ nav_item.target }}"
30
31
+ endif
32
33
>{{ nav_item.name }}</a
34
>
35
</li>
0 commit comments