Optional attributes?
Closed this issue · 0 comments
yacoob commented
Context: I'm trying to use ACE within Hugo. Is there a way to an attribute optional? I want to have a div that has an attribute only if a template variable is set. In other words: Right now if I say:
div data-foo={{ .foo }}
I'll get
<div data-foo="">
What do I need to say to get
<div>
if .foo
is not set?