mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Improve docs sidenav active link highlighting
Capture the slug once before applying it and add a slash to it to so we get a unique string to match against instead of a fuzzy partial 'contains'. Helps avoid 'grid' highlighting 'flexbox-grid', for example.
This commit is contained in:
parent
263e06a021
commit
42c52a278f
@ -25,6 +25,7 @@
|
||||
<ul class="nav bd-sidenav">
|
||||
{% for doc in group.pages %}
|
||||
{% assign slug = doc.title | downcase | replace: ' ', '-' | replace:'-&-','-' %}
|
||||
{% capture slug %}/{{ slug }}{% endcapture %}
|
||||
{% assign active = nil %}
|
||||
|
||||
{% if page.url contains slug %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user