diff options
| author | Mark Otto <[email protected]> | 2016-02-06 00:22:31 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-02-06 00:22:31 -0800 |
| commit | 42c52a278f4f3f5070fe943be37303eced605e38 (patch) | |
| tree | 73ea31f4d8b5547806956625d32589b7500eecdb /docs/_includes | |
| parent | 263e06a021c0ea666db71ce65fe1360e7e8e5baf (diff) | |
| download | bootstrap-42c52a278f4f3f5070fe943be37303eced605e38.tar.xz bootstrap-42c52a278f4f3f5070fe943be37303eced605e38.zip | |
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.
Diffstat (limited to 'docs/_includes')
| -rw-r--r-- | docs/_includes/nav-docs.html | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/_includes/nav-docs.html b/docs/_includes/nav-docs.html index fa2984188..b4f4d1f9e 100644 --- a/docs/_includes/nav-docs.html +++ b/docs/_includes/nav-docs.html @@ -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 %} |
