thoughtbot / middleman-aria_current

Accessibly indicate a current (active) link in Middleman
MIT License
8 stars 4 forks source link

Trim trailing slash from `current_path` #18

Closed coreyward closed 1 year ago

coreyward commented 6 years ago

This resolves issues where linking to /about fails to match the current_page.url for a directory index (/about/).

I also added a simple debug option to the arguments that will add a data-current-path attribute to the generated link to aide in diagnosing issues where middleman-aria_current doesn't behave as expected:

<%= current_link_to "About", "/about', debug: true %>
<a href="/about" data-current-page="/about">About</a>