How to set navigation class on current page

Just a side note: This works only on one-dimensional menus. If you have a submenu it gets more complicated, but Hugo has variables like .IsParent and .IsAncestor to work through this:

CSS does not (yet fully) support making the parent menu item active if a subitem has a certain class. Waiting for this one :slight_smile:

1 Like