Hi! I’m working on my first Hugo template. I have created a search partial, which depends on whether the user enables JSON output in the site config.
[outputs] home = [ "HTML", "JSON"] page = [ "HTML"]
The logic in the partial should be, “if JSON is among the home output types, add the following HTML”. (Because that is a prerequisite.)
I tried the
in function, but I’m sure I’m doing something wrong. Here is what I tried:
Please point me in the right direction. Here is my repository.