Closed yacoob closed 5 years ago
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?
.foo
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:
I'll get
What do I need to say to get
if
.foo
is not set?