I want to add a class=active to a li element but only when I’m on the index page that is located in layouts/index.html
How may I do this in Hugo?
{{ if .IsHome}}class="active"{{ end }}
1 Like
Perfect. Thank you very much!