mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-22 05:04:42 +00: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Reference in a new issue