diff options
author | Evan Read <eread@gitlab.com> | 2019-08-21 10:16:28 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-08-21 10:16:28 +0300 |
commit | c385f8edf4af5abe2cd0288eda120b8bf24fa9e5 (patch) | |
tree | db8bd22b023166c536031ed49bfd9260920804ff /layouts/global_nav.html | |
parent | 5928b1f989f2dd59ca161c96692bed86ca72e3cb (diff) |
Fix broken navigation link
Added logic to replace spaces and `/`
Diffstat (limited to 'layouts/global_nav.html')
-rw-r--r-- | layouts/global_nav.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/global_nav.html b/layouts/global_nav.html index 7ef7c952..14b4bd84 100644 --- a/layouts/global_nav.html +++ b/layouts/global_nav.html @@ -19,7 +19,7 @@ nav_items = nav_items_exists ? @items[nav_items_dir] : @items["/_data/default-na <!-- nav categories --> <% if sec[:section_categories] %> - <div class="collapse <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>show<% end %>" id="<%= sec[:section_title].delete(' ') %>"> + <div class="collapse <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>show<% end %>" id="<%= sec[:section_title].gsub(/[\s\/]/, '') %>"> <% sec[:section_categories].each do |cat| %> <span class="global-nav-cat nav-link"> <% if cat[:external_url] %> |