Match
Use the match helper to render when a page matches a path; this is useful to highlight the current page in navigation menus.
Arguments
StringThe target path to match against.StringThe string to output when a match is found.
Parameters
exactRender only when the location match is exact (default:false).
Example
When the render output is passed as the second argument it is used:
Or alternatively use the block syntax:
By default matching is not exact so that navigating to child directories would also be considered a match on a parent navigation item.
Use the hash parameter exact to match exactly: