Is it possible to create new "controls" in Hugo?

Let’s say that I very commonly run into the issue of wanting to show a picture, with a label with a different font and a description with yet another font. I repeat this very same pattern all over my website. Is there a way I could define something with a syntax of my own such that I could always refer it the same way?

Something such as myPic(“pic-url”, “label”, “description”)?

Thanks

Shortcodes are the Hugo. way to do this, and in some cases, you can also define Render Hooks which “extend” markdown. both would allow you to do the above.

1 Like

What is the context here? Markdown? If so yes, Render Hooks or Shortcode is your best options.

If it’s your templates, then partials but I guess you know that.